RN列数字段加上双引号,遵循数据库规范,感谢 jettisonJava 的贡献 #691

https://github.com/Tencent/APIJSON/pull/691
This commit is contained in:
TommyLemon 2024-03-14 21:47:01 +08:00 committed by GitHub
commit e86a0c6874
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4592,9 +4592,9 @@ public abstract class AbstractSQLConfig<T extends Object> implements SQLConfig<T
} }
int offset = getOffset(getPage(), count); int offset = getOffset(getPage(), count);
String alias = getAliasWithQuote(); String alias = getAliasWithQuote();
String quote = getQuote();
return "SELECT * FROM (SELECT " + alias + ".*, ROWNUM RN FROM (" + sql + ") " + alias return "SELECT * FROM (SELECT " + alias + ".*, ROWNUM "+ quote + "RN" + quote +" FROM (" + sql + ") " + alias
+ " WHERE ROWNUM <= " + (offset + count) + ") WHERE RN > " + offset; + " WHERE ROWNUM <= " + (offset + count) + ") WHERE "+ quote + "RN" + quote +" > " + offset;
} }
/**获取条件SQL字符串 /**获取条件SQL字符串