You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * List Documents * Get the first user's documents in a given collection using queries to filter your results. * @param databaseId * @param collectionId * @param queries * @throws — {AppwriteException} */findDocument<DocumentextendsModels.Document>(databaseId: string,collectionId: string,queries: string[],): Promise<Document>{returnnewPromise((resolve,reject)=>{this.listDocuments(databaseId,collectionId,queries).then((document)=>{if(document.documents[0])resolve(document.documents[0]);elsethrownewAppwriteException('No document found');}).catch(reject);});}
Hi
As I can understand from this, you are looking to find a particular document in the list of documents. Currently, you can do this using loops and if you prefer changing the search parameters, you can use queries for you to filter, sort, and paginate results.
I will keep this issue open as of now since we are very keen in considering feedbacks from our community
🔖 Feature description
Add a new function in the Database SDK called findDocument which uses listDocument to get the first returned document with Query.
🎤 Pitch
This feature can be used if you have an id for attitude such as a user_id attribute and don't want it to be the same as the document id.
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: