Skip to content

Commit

Permalink
Ensure sequential parameter collection.
Browse files Browse the repository at this point in the history
PostgresqlStatement.collectBindingParameters(…) now uses concatMap to collect encoded parameter values instead of flatMap to ensure a consistent parameter ordering.

[resolves #482]

Signed-off-by: Mark Paluch <mpaluch@vmware.com>
  • Loading branch information
mp911de committed Feb 16, 2022
1 parent 9afe70f commit aacf383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/r2dbc/postgresql/PostgresqlStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private static void tryNextBinding(Iterator<Binding> iterator, Sinks.Many<Bindin
private static Mono<List<ByteBuf>> collectBindingParameters(Binding binding) {

return Flux.fromIterable(binding.getParameterValues())
.flatMap(f -> {
.concatMap(f -> {
if (f == EncodedParameter.NULL_VALUE) {
return Flux.just(Bind.NULL_VALUE);
} else {
Expand Down

0 comments on commit aacf383

Please sign in to comment.