Skip to content

Commit

Permalink
RN列数字段加上双引号,遵循数据库规范,感谢 jettisonJava 的贡献 #691
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon authored Mar 14, 2024
2 parents 83d606a + c03d0d3 commit e86a0c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4592,9 +4592,9 @@ protected String getOraclePageSql(String sql) {
}
int offset = getOffset(getPage(), count);
String alias = getAliasWithQuote();

return "SELECT * FROM (SELECT " + alias + ".*, ROWNUM RN FROM (" + sql + ") " + alias
+ " WHERE ROWNUM <= " + (offset + count) + ") WHERE RN > " + offset;
String quote = getQuote();
return "SELECT * FROM (SELECT " + alias + ".*, ROWNUM "+ quote + "RN" + quote +" FROM (" + sql + ") " + alias
+ " WHERE ROWNUM <= " + (offset + count) + ") WHERE "+ quote + "RN" + quote +" > " + offset;
}

/**获取条件SQL字符串
Expand Down

0 comments on commit e86a0c6

Please sign in to comment.