Menu

#235 JBossQL Limit/Offset support

v3.2
open
nobody
JBossCMP (36)
5
2003-02-05
2003-02-05
No

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
would be

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
finder

Collection findAllOrders(String status, int offset, int
limit) throws FinderException;

Discussion

  • Rod Burgett

    Rod Burgett - 2003-02-06

    Logged In: YES
    user_id=681969

    Im getting a compile error in the test suite that I believe is
    related to this change:

    ...CompleteUnitTestCase.java:18: cannot resolve symbol
    symbol : class LimitOffsetTest
    location: ...CompleteUnitTestCase
    testSuite.addTestSuite( LmiitOffsetTest.class);

    Maybe there is a new class that's not checked in?

     
  • Jeremy Boynes

    Jeremy Boynes - 2003-02-06

    Logged In: YES
    user_id=378919

    Sorry, my bad. Unfortunately SF CVS appears to be having
    issues right now. I will commit this as soon as I can.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.