Skip to content

Commit 282c67f

Browse files
authored
需要增加一个是否存在的查询API:exists (x-ream#59)
1 parent 9a7ceb2 commit 282c67f

File tree

1 file changed

+2
-4
lines changed
  • sqli-repo/src/main/java/io/xream/sqli/repository/dao

1 file changed

+2
-4
lines changed

sqli-repo/src/main/java/io/xream/sqli/repository/dao/DaoImpl.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,7 @@ public boolean exists(Criteria criteria) {
429429
sql += " LIMIT 1";
430430
SqliLoggerProxy.debug(clz, sql);
431431

432-
List<Long> list = this.jdbcHelper.queryForPlainValueList(Long.class, sql, valueList,this.dialect);
433-
434-
return ! list.isEmpty();
432+
return ! this.jdbcHelper.queryForPlainValueList(Long.class, sql, valueList,this.dialect).isEmpty();
435433
}
436434

437435
private boolean update(String sql, Collection<Object> list, Dialect dialect, JdbcHelper jdbcHelper) {
@@ -443,4 +441,4 @@ private boolean update(String sql, Collection<Object> list, Dialect dialect, Jdb
443441
}
444442
}
445443

446-
}
444+
}

0 commit comments

Comments
 (0)