
Query.createdBefore doesnt work
TypeScript
tables.updateRows({
databaseId: process.env.APPWRITE_DATABASE_ID,
tableId: process.env.APPWRITE_TABLE_ID,
data: { indexed: true },
queries: [
Query.and(
Query.equal("indexed", false),
Query.createdBefore(maxRowCreationDate),
Query.limit(1000)
),
],
});
TypeScript
TypeError: queries.map is not a function
at _Query.and (file:///usr/local/server/src/function/node_modules/node-appwrite/dist/query.mjs:286:61)
at Module.default (file:///usr/local/server/src/function/src/main.js:170:17)
at async execute (/usr/local/server/src/server.js:220:16)
at async action (/usr/local/server/src/server.js:237:7)
at async /usr/local/server/src/server.js:26:5
even using Query.lessThan("$createdAt", date)
outputs AppwriteException: Server Error
TL;DR
Developers are facing issues with `queries.map is not a function` when using Query.and in their code. Even using Query.lessThan results in a `Server Error`.
Solution: In the code snippet, instead of `Query.and`, try using `new Appwrite.Query()` to create a new query instance. This should fix the issue with `queries.map is not a function`.Recommended threads
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
- Realtime integration with SSR auth
Hey, I have a nextjs website with SSR auth, works great. I use a session client for user verification and an admin client with API key. Both is used with node-...
- Adding "name" column to table creates 2-...
As stated, im adding the "name" column to one table, it adds 4 duplicates. In another table it adds 3 duplicates, and when I delete 1 of them, all duplucates di...
