mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-05 00:25:32 +08:00
[v0.2.6] 版本更新
- [U] 优化 ConditionalBuilder 的使用方式。 - [A] 为 TableQueryBuilder 添加分表查询limit方法。 - [A] 添加 SQLFunction 类,用于对SQL结果直接进行处理,且不需要在方法内处理异常,交由 ExceptionHandler 进行处理。
This commit is contained in:
@@ -49,16 +49,11 @@ public class EasySQLDemo {
|
||||
.build().execute(query -> {
|
||||
//可以直接进行数据处理
|
||||
ResultSet result = query.getResultSet();
|
||||
try {
|
||||
if (result != null && result.next()) {
|
||||
return UUIDUtil.toUUID(result.getString("uuid"));
|
||||
}
|
||||
} catch (SQLException ignored) {
|
||||
}
|
||||
return null;
|
||||
return result.next() ? UUIDUtil.toUUID(result.getString("uuid")) : null;
|
||||
}, (exception, action) -> {
|
||||
// 处理异常,不想处理直接填null
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void sqlQueryAsync(SQLManager sqlManager) {
|
||||
|
||||
Reference in New Issue
Block a user