mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
#2473 Tidy BasicSqlAnsiLimiter only, no functional change
This commit is contained in:
1 parent
1165d857d8
commit
6eb8eb0dd2
1 file changed
+1
-4
@@ -7,13 +7,10 @@ public class BasicSqlAnsiLimiter implements BasicSqlLimiter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String limit(String dbSql, int firstRow, int maxRows) {
|
public String limit(String dbSql, int firstRow, int maxRows) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder(50 + dbSql.length());
|
StringBuilder sb = new StringBuilder(50 + dbSql.length());
|
||||||
|
|
||||||
sb.append(dbSql);
|
sb.append(dbSql);
|
||||||
if (firstRow > 0) {
|
if (firstRow > 0) {
|
||||||
sb.append(" ").append("offset");
|
sb.append(" offset ").append(firstRow).append(" rows");
|
||||||
sb.append(" ").append(firstRow).append(" rows");
|
|
||||||
}
|
}
|
||||||
if (maxRows > 0) {
|
if (maxRows > 0) {
|
||||||
sb.append(" fetch next ").append(maxRows).append(" rows only");
|
sb.append(" fetch next ").append(maxRows).append(" rows only");
|
||||||
|
|||||||
Reference in new issue
Block a user