mirror of https://github.com/apache/openjpa.git
OPENJPA-447. Merge from ../../trunk. svn merge -c 596523, plus correction to 596661 merge
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@619212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
881461e99a
commit
befd295ea5
|
@ -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);
|
||||
|
|
|
@ -240,7 +240,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)
|
||||
|
|
|
@ -97,7 +97,7 @@ public class TestQueryPagination
|
|||
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration())
|
||||
.getDBDictionaryInstance();
|
||||
if (dict.supportsSelectStartIndex || dict.supportsSelectEndIndex)
|
||||
assertNotEquals(noRange, withRange);
|
||||
assertFalse(noRange.equals(withRange));
|
||||
else
|
||||
assertEquals(noRange, withRange);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue