Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Marzullo committed Feb 22, 2021
1 parent aceb396 commit afc0038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -381,7 +381,7 @@ public void testMassageForLimitOffset() {
int id = 0;
for (char letter = 'a'; letter <= 'z'; letter++) {
id++;
template.update(insertSql, id, String.valueOf(letter));
transaction.prepareAndExecute(insertSql, id, String.valueOf(letter));
}
transaction.commit();
} catch(Throwable e) {
Expand Down
Expand Up @@ -116,7 +116,7 @@ public String massageForLimitOffset(String sql, int limit, int offset) {
String order = sql.substring(orderIndex);
String innerSql = sql.substring(0, orderIndex - 1);
innerSql = StringUtils.replaceIgnoreCase(innerSql, " from", ", ROW_NUMBER() over (" + order + ") as RowNum from");
return "select from (" + innerSql + ") " +
return "select * from (" + innerSql + ") A " +
"where RowNum between " + (offset + 1) + " and " + (offset + limit);
}

Expand Down

0 comments on commit afc0038

Please sign in to comment.