SSPkrolik / nimongo

Pure Nim lang MongoDB driver
http://sspkrolik.github.io/nimongo
MIT License
101 stars 20 forks source link

`for ai in mc.find(query).limit(0).items(): ...` returns all documents; I would expect 0 docs #64

Closed timotheecour closed 5 years ago

timotheecour commented 5 years ago

perhaps the code should use -1 as special value to mean "all", not 0, which should be a valid limit

timotheecour commented 5 years ago

EDIT: sadly, this matches behavior of mongo shell, eg: db.tnimongo.find().limit(0) returns everything...

also mentioned here: http://devblog.me/wtf-mongo pymongo and D's vibe.mongo are also same

closing