Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I would like a batch delete option that will allow me to delete multiple rows in a single line #103

Open
shavitohad opened this issue Jul 21, 2022 · 2 comments

Comments

@shavitohad
Copy link
Contributor

This is my local implementation, I wish it was in the api.

export async function deleteAll(repo: Repository,
where?: EntityFilter) {
for (const clientRow of await repo.find({ where })) {
await repo.delete(clientRow);
}
}

@noam-honig
Copy link
Collaborator

It makes senes to try and optimize the calls, so that deleting 100 rows, will not send 100 delete rest api call/sql statements.
On the other hand, if there is a deleting or deleted handler, we still need them to run before the delete.

@noam-honig
Copy link
Collaborator

#221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants