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

Added offset and fetch functions to the SqlBuilder to allow pagination #40

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

Conversation

wbsantos
Copy link

I came across the need of making a pagination and I implemented the SQL Server way of doing it.
It does work with postgree too since it is just ansi sql, but I think Oracle and MySQL don't have those clauses yet (although I wasn't able to test it against the latest version of those databases).

@ctwoodwa
Copy link

Maybe i'm missing something, but why not move this code into the SqlBuilder class and change it to public class SqlBuilder : Dapper.SqlBuilder

@wbsantos
Copy link
Author

The SqlBuilder is a Dapper class, I'd have to make a pull request for the official Dapper repository to change it. Instead, I created a class that inherits from the Dapper.SqlBuilder.
Maybe a partial class would suffice though

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.

None yet

2 participants