Skip to content
New issue

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

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

Already on GitHub? # to your account

T-SQL Offset and Fetch #27

Open
dazinator opened this issue Dec 7, 2016 · 0 comments
Open

T-SQL Offset and Fetch #27

dazinator opened this issue Dec 7, 2016 · 0 comments

Comments

@dazinator
Copy link
Contributor

dazinator commented Dec 7, 2016

for T-SQL, Offset and Fetch are often used for paging.

Select blah from blah
order by blah
OFFSET((@pageNumber - 1) * @pageSize) ROWS
FETCH NEXT @pageSize ROWS ONLY; 

basically skipping x ROWS and then taking X rows.

Would be nice if this could be supported in the parser - but I understand that this might be t-sql specific.

Never really discussed how best to create database specific variants of SQL generation, but I always assumed you'd have an agnostic model to represent the structure / nature of the sql command, and then the formatter could output the command according to different language variants. That's great for formatting the output, but I am not sure whether there is anything in place for parsing different language variants.

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

No branches or pull requests

1 participant