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

Add deleteTop to delete a specific number of rows #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andreasbergqvist
Copy link

I had the need to delete a maximum number of rows in a table with LOTS of rows.
Using "batch delete" seemed to be a solution.

Don't know if you agree with how I added the code but the result is being able to create a:
DELETE TOP (*) FROM... query.

Add a DeleteTop(int count) function to delete a specific number of rows.
Add a DeleteTop(int count) function to delete a specific number of rows.
@MikaelEliasson
Copy link
Owner

Interesting. Will take a look at this after we shipped at work this week. Preferebly I would prefer if it was possible to get it to work with Take(x) to avoid adding too many methods.

@andreasbergqvist
Copy link
Author

My first thought was using Take(x) too. But it seemed a bit strange to be able to use it on all batch commands (incl update). And I didn't wanna mess too much in your code.

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

Successfully merging this pull request may close these issues.

2 participants