-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip/Limit criteria #12
Comments
Thank you for this suggestion. I think that I will add a Limit() method on the Query object :-) |
@gamedolphin, the last commit (5a5de33) adds a Limit(n int) method which allows to limit the output of FindAll() and Count(). You can give a look at the TestLimit function to see an example of usage. Before closing the issue, I wait for your feedback. |
What do you think about directly returning the document instead an array if Limit(n int) is 1? |
To achieve this, the FindAll() function should return an (interface{}, error). This means you should make additional check and conversion to get the actual type (slice or Document), also making the API not backward compatible. |
Would be useful to have a skip and limit criteria for number of documents returned by FindAll.
The text was updated successfully, but these errors were encountered: