Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
redkale committed Jan 30, 2020
1 parent 02b9548 commit 85582ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/org/redkalex/source/mysql/MysqlDataSource.java
Expand Up @@ -463,6 +463,7 @@ protected <T> CompletableFuture<Integer> exceptionallyUpdateTableNotExist(Comple
}

protected static <T> byte[] formatPrepareParam(EntityInfo<T> info, Attribute<T, Serializable> attr, Object param) {
if (param == null && info.isNotNullJson(attr)) return new byte[0];
if (param == null) return null;
if (param instanceof CharSequence) {
return param.toString().getBytes(StandardCharsets.UTF_8);
Expand Down
3 changes: 2 additions & 1 deletion src/org/redkalex/source/pgsql/PgsqlLDataSource.java
Expand Up @@ -278,7 +278,7 @@ protected <T, K extends Serializable, N extends Number> CompletableFuture<Map<K[
return rs;
}));
}

@Override
protected <T> CompletableFuture<T> findDB(EntityInfo<T> info, String sql, boolean onlypk, SelectColumn selects) {
return readPool.pollAsync().thenCompose((conn) -> executeQuery(info, conn, sql).thenApply((ResultSet set) -> {
Expand Down Expand Up @@ -365,6 +365,7 @@ protected static int fetchSize(Flipper flipper) {
}

protected static <T> byte[] formatPrepareParam(EntityInfo<T> info, Attribute<T, Serializable> attr, Object param) {
if (param == null && info.isNotNullJson(attr)) return new byte[0];
if (param == null) return null;
if (param instanceof byte[]) return (byte[]) param;
if (param instanceof Boolean) return (Boolean) param ? TRUE : FALSE;
Expand Down

0 comments on commit 85582ee

Please sign in to comment.