Skip to content

Commit 8405cd0

Browse files
committed
Progress on R2DBC
1 parent 96b3745 commit 8405cd0

File tree

4 files changed

+79
-157
lines changed

4 files changed

+79
-157
lines changed

src/main/resources/org/mybatis/dynamic/sql/util/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ ERROR.34=You must specify "select" or "selectDistinct" before any other clauses
5454
ERROR.35=Multi-select statements must have at least one "union" or "union all" expression
5555
ERROR.36=You must either implement the "render" or "renderWithTableAlias" method in a column or function
5656
ERROR.37=The "{0}" function does not support conditions that fail to render
57+
ERROR.39=Record based inserts are not supported with R2DBC
5758
INTERNAL.ERROR=Internal Error {0}

src/test/java/examples/r2dbc/raw/R2DBCUtils.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,18 @@ public static Statement createStatement(Connection connection, GeneralInsertStat
2929
}
3030

3131
private static Statement createStatement(Connection connection, String sql, Map<String, Object> parameters) {
32+
// TODO...when we merge the parameter bindings branch,
33+
// change this to use the bindings rather than the parameter map
3234
Statement statement = connection.createStatement(sql);
3335

34-
parameters.forEach(statement::bind);
36+
parameters.forEach((k, v) -> {
37+
if (v == null) {
38+
// TODO - change to class from parameter binding
39+
statement.bindNull(k, Double.class);
40+
} else {
41+
statement.bind(k, v);
42+
}
43+
});
3544

3645
return statement;
3746
}

0 commit comments

Comments
 (0)