bwgjoseph / mongoose-vs-ottoman

feature comparison between mongoose and ottoman
0 stars 1 forks source link

what is the behavior of passing negative limit? #91

Closed bwgjoseph closed 3 years ago

bwgjoseph commented 3 years ago

Hi,

May I know what is the behavior of passing negative limit in ottoman/couchbase? Is there any doc for this?

This is how MongoDB handles it

I did a quick test, and it seems that it is being ignored? and return no results

Thanks

bwgjoseph commented 3 years ago

Hmm, did you assigned it back to me accidentally?

AV25242 commented 3 years ago

Ha ! well I didnt type a response that was the mistake sorry about that :)

so LIMIT behaves like N1QL limit so if you were writing a N1QL query and you provide a LIMIT <= 0 it will return nothing. Its the same behavior

bwgjoseph commented 3 years ago

Great, thanks!