
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
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
- Unable to create push providers - FCM or...
Currently unable to create a push provider for FCM or APNS.... https://github.com/appwrite/console/issues/2045 When uploading a file... FCM = Valid file retu...
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
