You can download the code for this example here:
OnyxDevTools/onyx-database-examples/querying/SortingAndPagingExample.
Onyx Database is capable of sorting and paging.
This tutorial demonstrates how to order your results as well as limit the number of results and the starting index of your search.
As an example, we will retrieve a list of all "Player" entities in the database and specifically we will order the results by lastName and firstName.
We will retrieve the first page of results then the second.
To see how the data was seeded for this example, see Main.java.
A QueryOrder can be used to sort the result set. There is not limit to the number of QueryOrders you can use in a single Query. This list of QueryOrders below will retrieve a list of players and order them by lastName ascending, then firstName ascending.
This example uses one of the many constructors that are available.
Our goal is to bring about change by enabling people to use simple and quality software in order to make sad engineers happy.
Copyright ©2017 Onyx Development Tools, LLC. All rights reserved.