Julian Reschke created OAK-1746:
-----------------------------------
Summary: find portable variant of SQL "limit" clause
Key: OAK-1746
URL: https://issues.apache.org/jira/browse/OAK-1746
Project: Jackrabbit Oak
Issue Type: Sub-task
Reporter: Julian Reschke
Assignee: Julian Reschke
Fix For: 1.1
We currently use
{code}
String t = "select DATA, BDATA from " + tableName + " where ID > ? and
ID < ?";
if (indexedProperty != null) {
t += " and MODIFIED >= ?";
}
t += " order by ID";
if (limit != Integer.MAX_VALUE) {
t += " limit ?";
}
{code}
but this doesn't work for all DB2 installations (it works on mine, but not on
Manfred's).
Apparent "fetch first ... rows only" is supposed to work (*), but I didn't have
success yet with it.
(*) In H2 with 1.4.*, or in 1.3 with "mode=DB2"
--
This message was sent by Atlassian JIRA
(v6.2#6252)