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

[FEATURE]: Ability to limit and order delete queries #574

Open
ajs11174 opened this issue May 13, 2023 · 4 comments
Open

[FEATURE]: Ability to limit and order delete queries #574

ajs11174 opened this issue May 13, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@ajs11174
Copy link

Describe want to want

The .limit() and .orderBy() function should be available on delete queries.

await db.delete(tbl).where(eq(tbl.field, "some value")).orderBy(tbl.field).limit(10);

MySQL Reference

@ajs11174 ajs11174 added the enhancement New feature or request label May 13, 2023
@coryvirok
Copy link

Not being able to limit deletes is pretty scary from a defensive programming perspective.

@wscotten
Copy link

bump! Would really like this since Planetscale limits deletes to 100k records at a time.

@davidchalifoux
Copy link
Sponsor

Bump! I would like to know that certain queries will only delete at max one item.
This would also be a great addition to update as well!

@fermentfan
Copy link

Is there any update to this? I would also love to be able to limit updates. Was really surprised that this isn't possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants