File tree 2 files changed +11
-9
lines changed
src/main/java/org/springframework/data/r2dbc/function
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,10 @@ public void bindTo(Statement statement) {
63
63
64
64
if (value .isEmpty ()) {
65
65
statement .bindNull (identifier , value .getType ());
66
+ } else {
67
+ statement .bind (identifier , value .getValue ());
66
68
}
67
69
68
- statement .bind (identifier , value );
69
70
}
70
71
71
72
@ Override
@@ -86,7 +87,7 @@ public void bindTo(Statement statement) {
86
87
if (value .isEmpty ()) {
87
88
statement .bindNull ((int ) identifier , value .getType ());
88
89
} else {
89
- statement .bind ((int ) identifier , value );
90
+ statement .bind ((int ) identifier , value . getValue () );
90
91
}
91
92
}
92
93
Original file line number Diff line number Diff line change @@ -112,18 +112,19 @@ private static Bindings createBindings(Binding binding) {
112
112
.add (new Bindings .IndexedSingleBinding ( //
113
113
((IndexedBindMarker ) bindMarker ).getIndex (), //
114
114
settableValue ) //
115
- );
115
+ );
116
116
}
117
117
});
118
118
119
119
binding .getValues ().forEach ( //
120
120
(bindMarker , value ) -> {
121
- singleBindings //
122
- .add (new Bindings .NamedSingleBinding <>( //
123
- bindMarker .getPlaceholder (), //
124
- value instanceof SettableValue ? (SettableValue ) value
125
- : SettableValue .from (value )) //
126
- );
121
+ if (bindMarker instanceof IndexedBindMarker ) {
122
+ singleBindings //
123
+ .add (new Bindings .IndexedSingleBinding ( //
124
+ ((IndexedBindMarker ) bindMarker ).getIndex (), //
125
+ value instanceof SettableValue ? (SettableValue ) value : SettableValue .from (value )) //
126
+ );
127
+ }
127
128
});
128
129
129
130
return new Bindings (singleBindings );
You can’t perform that action at this time.
0 commit comments