mirror of
https://github.com/apache/openjpa.git
synced 2025-02-06 18:19:00 +00:00
OPENJPA-447. It looks like some of our DBDictionaries might not be handling ranging properly even after this fix.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@596523 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1dcd7b1d75
commit
d4e978f5ae
@ -108,7 +108,8 @@ public abstract class AbstractSQLServerDictionary
|
||||
super.setNull(stmnt, idx, colType, col);
|
||||
}
|
||||
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end) {
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end,
|
||||
boolean subselect) {
|
||||
// cannot use a value here, since SQLServer does not support
|
||||
// bound parameters in a "TOP" clause
|
||||
buf.append(" TOP ").append(Long.toString(end));
|
||||
|
@ -185,7 +185,8 @@ public class H2Dictionary extends DBDictionary {
|
||||
return cols;
|
||||
}
|
||||
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end) {
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end,
|
||||
boolean subselect) {
|
||||
if (end != Long.MAX_VALUE)
|
||||
buf.append(" LIMIT ").appendValue(end - start);
|
||||
if (start != 0)
|
||||
|
@ -250,7 +250,8 @@ public class HSQLDictionary
|
||||
}
|
||||
}
|
||||
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end) {
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end,
|
||||
boolean subselect) {
|
||||
// HSQL doesn't parameters in range
|
||||
buf.append(" LIMIT ").append(String.valueOf(start)).append(" ");
|
||||
if (end == Long.MAX_VALUE)
|
||||
|
@ -162,7 +162,8 @@ public class MySQLDictionary
|
||||
}
|
||||
}
|
||||
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end) {
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end,
|
||||
boolean subselect) {
|
||||
buf.append(" LIMIT ").appendValue(start).append(", ");
|
||||
if (end == Long.MAX_VALUE)
|
||||
buf.appendValue(Long.MAX_VALUE);
|
||||
|
@ -241,7 +241,8 @@ public class PostgresDictionary
|
||||
stmnt.setNull(idx, colType);
|
||||
}
|
||||
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end) {
|
||||
protected void appendSelectRange(SQLBuffer buf, long start, long end,
|
||||
boolean subselect) {
|
||||
if (end != Long.MAX_VALUE)
|
||||
buf.append(" LIMIT ").appendValue(end - start);
|
||||
if (start != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user