Ipsoka
I know that I can OR
values with
TypeScript
database.listDocuments(
queries: [
Query.equal("attribute", [value1, value2]),
]
)
And I know I can AND
attributes like so
TypeScript
database.listDocuments(
queries: [
Query.equal("attribute1", [value1]),
Query.equal("attribute2", [value2]),
]
)
Is there a way to also OR
attributes? Something like
TypeScript
database.listDocuments(
queries: [
Query.equal(["attribute1", "attribute2"], value1),
]
)
Or am I forced to do this ine two seperate queries?
TL;DR
The user is asking if there is a way to check multiple attributes at once in a database query using Appwrite. Currently, Appwrite does not support passing an array in the field value. The user suggests starting a feature request on the Appwrite GitHub page. The user then provides examples of how to use `OR` and `AND` conditions separately. However, the user is asking if there is a way to `OR` attributes together in a single query. It is not possible to `OR` attributes together in Appwrite, so the user is forced to use two separate queries. Binyamin
As of now Appwrite don't support passing array in the field value
That's sounds like something that can benefit many peoples. You can start a feature request in Github https://github.com/appwrite/appwrite/issues
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- 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.
- Current User is Not authorized
recreating same Thread