gordthompson / sqlalchemy-access

A Microsoft Access dialect for SQLAlchemy.
MIT License
50 stars 9 forks source link

offset criterion doesn't works on access/mssql databases #8

Closed dlavino closed 4 years ago

dlavino commented 4 years ago

When using an sql_alchemy Model to implement a table I can select data like that:

results = UserModel.query.limit(10) it works fine, give me the first 10 lines

but... results = UserModel.query.offset(10) it doesn't work, returning all lines.

it doesn't work either: results = UserModel.query.limit(10).offset(10) Shoud return 10 lines from the 10th ahead, but still returning all lines.

Is works fine in databases other than access/mssql ones.

EDIT: I just found ACCESS is not compatible with offset criterion, but mssql does (since followed by order_by). I've migrated my database to mssql and now it works.