Support has been added for restricting the amount of
data fetched from a JDBC database.
JBossQL now supports optional OFFSET and LIMIT
parameters supplied at the end of a query. An example
SELECT OBJECT(o) FROM Order o WHERE o.status = ?1 ORDER
BY o.orderDate OFFSET ?2 LIMIT ?3
This works by discarding rows until <offset> rows have
been fetched and then returning immedately once another
<limit> rows have been fetched. This simple mechanism
is intended to preserve portability across database
vendors. Other approaches including scrollable cursors
or database-specific syntax may be considered later.
Currently the parameters passed to LIMIT and OFFSET
must be int values (or Integer for DynamicQL) as in the
Collection findAllOrders(String status, int offset, int
limit) throws FinderException;