Closed Rockyyost closed 9 years ago
How do you limit results in a query?
I've tired the following, to limit to 10 docs:
for doc in find(collection, query, 0, 10) println(doc) end
But I get this error: 'find' has no method matching find(::MongoCollection, ::Dict{Any, Any}, ::Int64, ::Int64)
Thank you for your help!
Hi there, I just checked the source and it looks like you want to do find(collection, query, skip=0, limit=10). Let me know if that works!
How do you limit results in a query?
I've tired the following, to limit to 10 docs:
for doc in find(collection, query, 0, 10) println(doc) end
But I get this error: 'find' has no method matching find(::MongoCollection, ::Dict{Any, Any}, ::Int64, ::Int64)
Thank you for your help!