Skip to content

Commit 94c8f75

Browse files
committed
#212 - Polishing.
Consistently apply summing of updated rows. Tweak copyright years in license header to reflect file inception year. Original pull request: #213.
1 parent 2fac62a commit 94c8f75

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ <T> FetchSpec<T> exchange(Supplier<String> sqlSupplier, BiFunction<Row, RowMetad
391391
return new DefaultSqlResult<>(DefaultDatabaseClient.this, //
392392
sql, //
393393
resultFunction, //
394-
it -> resultFunction.apply(it).flatMap(Result::getRowsUpdated).next(), //
394+
it -> sumRowsUpdated(resultFunction, it), //
395395
mappingFunction);
396396
}
397397

src/main/java/org/springframework/data/r2dbc/core/DefaultSqlResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Flux<Object> all() {
5656

5757
@Override
5858
public Mono<Integer> rowsUpdated() {
59-
return Mono.empty();
59+
return Mono.just(0);
6060
}
6161
};
6262

src/main/kotlin/org/springframework/data/r2dbc/core/UpdatedRowsFetchSpecExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/test/kotlin/org/springframework/data/r2dbc/core/UpdatedRowsFetchSpecExtensionsTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)