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

OFFSET behavior not conventional #858

Closed
webdori882 opened this issue Apr 5, 2017 · 3 comments
Closed

OFFSET behavior not conventional #858

webdori882 opened this issue Apr 5, 2017 · 3 comments

Comments

@webdori882
Copy link

The current behavior of alasql when performing limit/offset is not in line with what major SQL DB engines provide. The conventional expectation when passing these "pagination" params is the "OFFSET" number or rows are skipped but that is not the case based on the example provided "http://jsfiddle.net/efn1yoer/1/" and based on the function "doLimit()".

Please confirm if this is intended behavior and what it is modeled after.

Thanks in advance, - J

@mathiasrw
Copy link
Member

I feel confident that it is not intended.

Postgress:

OFFSET says to skip that many rows before beginning to return rows.

Oracle:

skip the N first rows in a result set before starting to return any rows

MSSQL:

Skip first 10 rows from the sorted result set and return the remaining rows

MySQL is the same...

This will be fixed

@mathiasrw
Copy link
Member

Will be part of the next release. Thanks for letting us know...

@webdori882
Copy link
Author

Thanks for the prompt update, you guys rock!

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