castor

Add support for LIMIT and OFFSET clause on sapdb/maxdb

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.3
  • Fix Version/s: 1.3.1
  • Component/s: JDO queries
  • Labels:
    None
  • Number of attachments :
    3

Description

From version 7.6 SapDB/MaxDB added support for LIMIT and OFFSET clause.
This will allow us to add support for LIMIT/OFFSET clause to OQL on sapdb.

  1. patch-C2856-20091127.txt
    27/Nov/09 5:00 AM
    3 kB
    Clovis Wichoski
  2. patch-C2856-20091127-2.txt
    27/Nov/09 6:35 AM
    3 kB
    Clovis Wichoski
  3. patch-C2856-20091129.txt
    29/Nov/09 11:01 AM
    4 kB
    Ralf Joachim

Activity

Hide
Clovis Wichoski added a comment -

patch added that implement LIMIT/OFFSET clause for sapdb driver.

Show
Clovis Wichoski added a comment - patch added that implement LIMIT/OFFSET clause for sapdb driver.
Hide
Clovis Wichoski added a comment -

testing my application with an OQL that have DISTINCT and LIMIT clauses i discovered that maxdb returns different results when DISTINCT is executed alone, and when executed with LIMIT clause, to avoid this strange behavior i discovered that surrounding the SQL statement with a SELECT * FROM ( sqlToSurround ) works, then just put LIMIT after surrounding.

This new patch only surround SQL if the OQL have a DISTINCT and LIMIT clauses.

ps: i dont changed test case test32 to test this, because i dont know the impact of this in other databases.

a full history about the problem can be checked at: http://forumsa.sdn.sap.com/thread.jspa?threadID=1543393&tstart=0

Show
Clovis Wichoski added a comment - testing my application with an OQL that have DISTINCT and LIMIT clauses i discovered that maxdb returns different results when DISTINCT is executed alone, and when executed with LIMIT clause, to avoid this strange behavior i discovered that surrounding the SQL statement with a SELECT * FROM ( sqlToSurround ) works, then just put LIMIT after surrounding. This new patch only surround SQL if the OQL have a DISTINCT and LIMIT clauses. ps: i dont changed test case test32 to test this, because i dont know the impact of this in other databases. a full history about the problem can be checked at: http://forumsa.sdn.sap.com/thread.jspa?threadID=1543393&tstart=0
Hide
Ralf Joachim added a comment -

Final patch with small improvements.

Show
Ralf Joachim added a comment - Final patch with small improvements.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
30m
Original Estimate - 30 minutes
Remaining:
30m
Remaining Estimate - 30 minutes
Logged:
Not Specified
Time Spent - Not Specified