
Hello, I need to get documents from Database that start with "2024-11" but it's not returning anything.
Here current used for this query
`export async function searchLogbookByDate( query: string, // eslint-disable-next-line prettier/prettier userId: number ) { try { let queryArray; queryArray = [ Query.startsWith("date", query), Query.equal("userId", userId), ]; console.log("date query", queryArray);
queryArray as unknown as Query[];
const posts = await databases.listDocuments(
databaseId,
logbookCollectionId,
// eslint-disable-next-line prettier/prettier
queryArray as unknown as string[]
);
console.log(
query,
// eslint-disable-next-line prettier/prettier
"Posts in search logbook by date" + JSON.stringify(posts)
);
if (query === null) throw new Error("Something went wrong");
if (!posts) throw new Error("Something went wrong");
return posts.documents;
} catch (error: any) { Alert.alert("Error", error.message); } }`
Recommended threads
- Stuck at pinging the server to finish ad...
I'm not using the starter app and I'm not sure how to finish connecting my app to Appwrite.io. Is there a CURL command I can run to finish setup?
- 500 internal error
I get a 500 internal error when trying to access my database on appwrite cloud. Sometimes it would start working but this time it never corrects.
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
