🚀 Enhancement: Bulk delete #8758
Labels
enhancement
New feature or request
product / databases
Fixes and upgrades for the Appwrite Database.
8000
🔖 Enhancement description
There should be a function inside the Database Class in client side sdks, that takes in the databaseID, collectionID and a query then will delete all the documents in the collection that matches the query.
Right now to achieve this functionality requests are sent to different endpoint of the server from client. One request to listAllDocuments with the query and then running a for loop on the list and making request to deleteDocument endpoint for each document in the list
the input parameter structure of this function is similar to that of the listAllDocuments function, listallDocuments just lists the documents that match the query while, deleteAllDocuments() will delete the documents that match the query
🎤 Pitch
I believe just to delete documents based on a query should not cost one request just to fetch the documents that satisfy the query, then individually make requests to delete a particular document
This heavy methodology could easily be lightened, if there were to exist an endpoint that deletes documents based on a query. So the extra time that the request takes to reach the server for deletion of a document will be saved
👀 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: