Page 1 of 1

Paged queries with QxORM

PostPosted: Wed May 25, 2016 10:40 am
by mdw
Does QxORM provide some sort of paged results or cursors?

In MS Linq you could write something like this:
Code: Select all
query = query.Take(page).Skip((page - 1) * pageSize);

Re: Paged queries with QxORM

PostPosted: Wed May 25, 2016 1:14 pm
by mdw
Ah, maybe I could do like this:

Code: Select all
query = query.limit(pageSize, (page-1) * pageSize);

Re: Paged queries with QxORM

PostPosted: Wed May 25, 2016 3:58 pm
by qxorm
Hello,

Yes : qx::QxSqlQuery::limit() is the method to use.