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:
Patrick Linskey 2008-02-06 23:05:54 +00:00
parent 881461e99a
commit befd295ea5
6 changed files with 11 additions and 6 deletions

View File

@ -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));

View File

@ -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)

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

@ -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);
}