this is the query i apply to it:
private filterQuery(query: string[], options?: GenericListOptions): string[] {
query = [
Query.orderDesc(options?.sortField || "$createdAt"),
Query.limit(options?.limit || 15),
Query.isNull("deletedAt"),
Query.select([
"$id",
"status",
"totalAmount",
"userId",
"items",
"address",
"$createdAt",
"$updatedAt",
"deletedAt",
]),
];
if (options?.status && options?.status != -2) {
query.push(Query.equal("status", options?.status));
}
if (options?.from && options?.to) {
query.push(Query.between("$createdAt", options?.from, options?.to));
}
return query;
}
are one of those attributes a relationship attribute?
yeah address and items are relational
Queries on relationships are not supported
thanks, so i guess i just have to put ItemIds and addressId As their Attribute to exclude Items And Address.
Recommended threads
- I recently switched to TablesDb. When li...
olddb.list_documents( queries =[ Query.order_desc("timestamp"), Query.equal("isPosted",[False]) ] ) Above works fine and reruns documents But below don't return...
- Database error validating 'min' and 'max...
I keep seeing an error when I try to add a column to a database table within the AppWrite cloud UI. I also see this error when trying to create or update a reco...
- Anyone manage to get a slack-bot working...
I'm trying to setup a bot the send and retrieve slack messages to a chat in my site. I've failed with SSE and appwrite functions soo far... i'll trying polling ...