mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
a4e98c6885
commit
1030f22757
@ -35,8 +35,8 @@ public class OracleDialect extends AnsiSqlDialect {
|
||||
return find
|
||||
.insertPreFragment("SELECT * FROM ( SELECT row_.*, rownum rownum_ from ( ")
|
||||
.append(" ) row_ where rownum <= ").append(startEnd[1])//
|
||||
.append(") table_alias")//
|
||||
.append(" where table_alias.rownum_ > ").append(startEnd[0]);//
|
||||
.append(") table_alias_")//
|
||||
.append(" where table_alias_.rownum_ > ").append(startEnd[0]);//
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,9 +150,16 @@ public class ResultSetUtil {
|
||||
*/
|
||||
public static <T extends Entity> T toEntity(final T row, final int columnCount, final ResultSetMetaData meta, final ResultSet rs, final boolean withMetaInfo) throws SQLException {
|
||||
int type;
|
||||
String columnLabel;
|
||||
for (int i = 1; i <= columnCount; i++) {
|
||||
type = meta.getColumnType(i);
|
||||
row.put(meta.getColumnLabel(i), getColumnValue(rs, i, type, null));
|
||||
columnLabel = meta.getColumnLabel(i);
|
||||
if("rownum_".equalsIgnoreCase(columnLabel)){
|
||||
// issue#2618@Github
|
||||
// 分页时会查出rownum字段,此处忽略掉读取
|
||||
continue;
|
||||
}
|
||||
row.put(columnLabel, getColumnValue(rs, i, type, null));
|
||||
}
|
||||
if (withMetaInfo) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user