mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-22 22:54:54 +00:00
Merge pull request #1688 from thibaultmeyer/bugfix/useless-comparison-test
Remove useless comparison test
This commit is contained in:
@@ -65,13 +65,9 @@ public class SqlServer2005SqlLimiter implements SqlLimiter {
|
||||
sb.append(NEW_LINE).append(") ");
|
||||
sb.append(rowNumberWindowAlias);
|
||||
sb.append(" where ");
|
||||
if (firstRow > 0) {
|
||||
sb.append(" rn > ").append(firstRow);
|
||||
if (lastRow > 0) {
|
||||
sb.append(" and ");
|
||||
}
|
||||
}
|
||||
sb.append(" rn > ").append(firstRow);
|
||||
if (lastRow > 0) {
|
||||
sb.append(" and ");
|
||||
sb.append(" rn <= ").append(lastRow);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,8 @@ public class SqlServerSqlLimiter implements SqlLimiter {
|
||||
}
|
||||
|
||||
sb.append(dbSql);
|
||||
if (firstRow > 0) {
|
||||
sb.append(" ").append("offset");
|
||||
sb.append(" ").append(firstRow).append(" rows");
|
||||
}
|
||||
sb.append(" ").append("offset");
|
||||
sb.append(" ").append(firstRow).append(" rows");
|
||||
if (maxRows > 0) {
|
||||
sb.append(" fetch next ").append(maxRows).append(" rows only");
|
||||
}
|
||||
|
||||
@@ -48,10 +48,8 @@ class CQueryPlanRawSql extends CQueryPlan {
|
||||
// an associated bean is in the raw SQL but is mapped columnIgnore
|
||||
for (int i = 0; i < indexPositions.length; i++) {
|
||||
if (indexPositions[i] == 0) {
|
||||
if (i < indexPositions.length) {
|
||||
// expect discriminator column to immediately proceed id column
|
||||
indexPositions[i] = indexPositions[i + 1] - 1;
|
||||
}
|
||||
// expect discriminator column to immediately proceed id column
|
||||
indexPositions[i] = indexPositions[i + 1] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user