Skip to content

Commit f5d7791

Browse files
committed
#73 - hacking - removed call to old bind.
1 parent 71fea91 commit f5d7791

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

src/main/java/org/springframework/data/r2dbc/function/DefaultDatabaseClient.java

+2-12
Original file line numberDiff line numberDiff line change
@@ -908,20 +908,10 @@ private <R> FetchSpec<R> exchange(BiFunction<Row, RowMetadata, R> mappingFunctio
908908
byName.forEach(it::bind);
909909
});
910910

911-
String sql = operation.toQuery();
912-
Function<Connection, Statement> insertFunction = it -> {
913-
914-
if (logger.isDebugEnabled()) {
915-
logger.debug("Executing SQL statement [" + sql + "]");
916-
}
917-
918-
return operation.bind(it.createStatement(sql));
919-
};
920-
921-
Function<Connection, Flux<Result>> resultFunction = it -> Flux.from(insertFunction.apply(it).execute());
911+
Function<Connection, Flux<Result>> resultFunction = it -> Flux.from(operation.bind(it).execute());
922912

923913
return new DefaultSqlResult<>(DefaultDatabaseClient.this, //
924-
sql, //
914+
operation.toQuery(), //
925915
resultFunction, //
926916
it -> resultFunction.apply(it).flatMap(Result::getRowsUpdated).next(), //
927917
mappingFunction);

src/main/java/org/springframework/data/r2dbc/function/DefaultStatementFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ public Statement bind(Statement to) {
475475
@Override
476476
public Statement bind(Connection connection) {
477477

478-
// TODO add logging
478+
// TODO add back logging
479479
// if (logger.isDebugEnabled()) {
480480
// logger.debug("Executing SQL statement [" + sql + "]");
481481
// }

src/main/java/org/springframework/data/r2dbc/function/PreparedOperation.java

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public interface PreparedOperation<T> extends QueryOperation {
4545
* @param to the target statement to bind parameters to.
4646
* @return the bound statement.
4747
*/
48+
@Deprecated
4849
Statement bind(Statement to);
4950

5051
Statement bind(Connection connection);

0 commit comments

Comments
 (0)