RN列数字段加上双引号,遵循数据库规范,感谢 jettisonJava 的贡献 #691
https://github.com/Tencent/APIJSON/pull/691
This commit is contained in:
commit
e86a0c6874
@ -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字符串
|
||||||
|
Loading…
Reference in New Issue
Block a user