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

#3462 Add Paging as alternative to maxRows + firstRow + orderBy #3478

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

rbygrave
Copy link
Member

@rbygrave rbygrave commented Sep 12, 2024

Paging is an alternative to specifying the maxRows + firstRow + orderBy on a query.

Example:

    var orderBy = OrderBy.of("lastName desc nulls first, firstName asc");
    var paging = Paging.of(0, 100, orderBy);

    new QContact()
      .setPaging(paging)
      .lastName.startsWith("foo")
      .findList();

// or ...

    DB.find(Contact.class)
      .setPaging(paging)
      .where().startsWith("lastName", "foo")
      .findList();

Paging is an alternative to specifying the maxRows + firstRow + orderBy on a query.

Example:
```java

    var orderBy = OrderBy.of("lastName desc nulls first, firstName asc");
    var paging = Paging.of(0, 100, orderBy);

    DB.find(Contact.class)
      .setPaging(paging)
      .where().startsWith("lastName", "foo")
      .findList();
```
@rbygrave rbygrave self-assigned this Sep 12, 2024
@rbygrave rbygrave linked an issue Sep 12, 2024 that may be closed by this pull request
The plan is to migrate OrderBy into an interface
@rbygrave rbygrave added this to the 15.6.0 milestone Sep 16, 2024
@rbygrave rbygrave merged commit 0c01ecb into master Sep 17, 2024
1 check passed
@rbygrave rbygrave deleted the feature/3462 branch September 17, 2024 10:03
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.

Add some PageRequest params for query beans
1 participant