gresakgOriginal post
Rank 1: Thread
I am doing a listDocumments on a collection in the database, with a few queries, but the limit gets ignored regardless to what I write in the limit query. Whatever I do I always get back 25 results
JavaScript
const promise = db.listDocuments( schema.dbid, schema.zapisi, [ Query.select( [ /* ... bunch of fields ... */ ]), Query.equal('isDeleted', false), Query.greaterThanEqual('zacetekKlica',period.value[0].toISOString()), Query.lessThanEqual('zacetekKlica', period.value[1].toISOString(), Query.limit(10)) ])Am I doing something wrong or is it a bug?
Summary
Title: [SOLVED] Bug causing query limit to be ignored
Description: The user is experiencing a bug where the query limit is being ignored in their code. They have tried various approaches to set the limit but still receive 25 results. The user is unsure if they are making a mistake or if it is a bug.
Solution: After analyzing the code snippet provided, it seems that there is a missing closing parenthesis in the `Query.lessThanEqual` line. The correct code should be:
```javascript
const promise = db.listDocuments(schema.dbid, schema.zapisi, [
Query.select([
/* ... bunch