Rank 3: Container
WHERE column_name IN (value 1, value 2, value 3, etc...);``` is missing from web.sdk, we have to make several requests, which takes a ton of time if we want to delete .e.g 10k items.Votes
0
Replies
8
Participants
Unknown
Messages
9
Rank 3: Container
WHERE column_name IN (value 1, value 2, value 3, etc...);``` is missing from web.sdk, we have to make several requests, which takes a ton of time if we want to delete .e.g 10k items.Admin
Making multiple requests is the way to go at the moment. to optimize this, you can:
Rank 3: Container
well that's exactly what I do already ```js
if(!payload.remove || !Array.isArray(payload.remove)){
return res.json({"error": "no payload", "payload": payload}, 400)
}
const { remove } = payload;
const batchSize = 10;
const totalBatches = Math.ceil(remove.length / batchSize);
for (let i = 0; i < totalBatches; i++) {
const start = i * batchSize;
const end = start + batchSize;
const batchIds = remove.slice(start, end);
const promises = batchIds.map((id) => {
return database.deleteDocument('default', 'rss_articles', id)
});
await Promise.all(promises);
}``` But it deletes one document at the time, imagine if there is a lot of entries, it will be a lot slower. Anyway, Are there any plans to look in to this ?
Admin
Feel free to create a feature request
Rank 3: Container
Where exactly can I do that?
Admin
GitHub issues
Rank 3: Container
Ok, thank you very much
Rank 3: Container
[Solved] Where do we add request for mass delete?
Rank 3: Container
[SOLVED] Where do we add request for mass delete?