gresakg
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
TypeScript
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?
TL;DR
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 gresakg
There's a bug in the code 😅 🤣 You can try to find it. It only took me about an hour 🤪
Drake
[SOLVED] Query limit ignored
Recommended threads
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.
- Seed db
hello there... is this correct way to seed appwrite
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?