Skip to content

Commit 361d801

Browse files
schauderodrotbohm
authored andcommitted
#64 - Polishing.
Fixed typos, formatting and minor errors in documentation. Original pull request: #106.
1 parent 774d2e8 commit 361d801

File tree

8 files changed

+25
-23
lines changed

8 files changed

+25
-23
lines changed

src/main/asciidoc/reference/r2dbc-core.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ This approach lets you use the standard `io.r2dbc.spi.ConnectionFactory` instanc
229229

230230
Spring Data R2DBC supports drivers by R2DBC's pluggable SPI mechanism. Any driver implementing the R2DBC spec can be used with Spring Data R2DBC.
231231
R2DBC is a relatively young initiative that gains significance by maturing through adoption.
232-
As of writing the following 3 drivers are available:
232+
As of writing the following drivers are available:
233233

234234
* https://github.com/r2dbc/r2dbc-postgresql[Postgres] (`io.r2dbc:r2dbc-postgresql`)
235235
* https://github.com/r2dbc/r2dbc-h2[H2] (`io.r2dbc:r2dbc-h2`)

src/main/asciidoc/reference/r2dbc-fluent.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ Mono<Void> update = databaseClient.update()
192192
<4> Use `then()` to just update rows an object without consuming further details. Modifying statements allow also consumption of the number of affected rows.
193193
====
194194

195-
[r2dbc.datbaseclient.fluent-api.delete.methods]]
196-
==== Methods for DELETE operations
195+
[r2dbc.datbaseclient.fluent-api.update.methods]]
196+
==== Methods for UPDATE operations
197197

198-
The `delete()` entry point exposes some additional methods that provide options for the operation:
198+
The `update()` entry point exposes some additional methods that provide options for the operation:
199199

200200
* *table* `(Class<T>)` used to specify the target table using a mapped object. Returns results by default as `T`.
201201
* *table* `(String)` used to specify the target table name. Returns results by default as `Map<String, Object>`.

src/main/asciidoc/reference/r2dbc-sql.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= Executing Statements
33

44
Running a statement is the basic functionality that is covered by `DatabaseClient`.
5-
The following example shows what you need to include for a minimal but fully functional class that creates a new table:
5+
The following example shows what you need to include for minimal but fully functional code that creates a new table:
66

77
[source,java]
88
----
@@ -32,7 +32,7 @@ Mono<Integer> affectedRows = client.execute()
3232
.fetch().rowsUpdated();
3333
----
3434

35-
Running a `SELECT` query returns a different type of result, in particular tabular results. Tabular data is typically consumes by streaming each `Row`.
35+
Running a `SELECT` query returns a different type of result, in particular tabular results. Tabular data is typically consumed by streaming each `Row`.
3636
You might have noticed the use of `fetch()` in the previous example.
3737
`fetch()` is a continuation operator that allows you to specify how much data you want to consume.
3838

src/main/java/org/springframework/data/r2dbc/dialect/Bindings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.springframework.util.Assert;
3434

3535
/**
36-
* Value object representing value and {@code NULL} bindings for a {@link Statement} using {@link BindMarkers}. Bindings
36+
* Value object representing value and {@code null} bindings for a {@link Statement} using {@link BindMarkers}. Bindings
3737
* are typically immutable.
3838
*
3939
* @author Mark Paluch

src/main/java/org/springframework/data/r2dbc/dialect/MutableBindings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.util.Assert;
2323

2424
/**
25-
* Mutable extension to {@link Bindings} for Value and {@code NULL} bindings for a {@link Statement} using
25+
* Mutable extension to {@link Bindings} for Value and {@code null} bindings for a {@link Statement} using
2626
* {@link BindMarkers}.
2727
*
2828
* @author Mark Paluch

src/main/java/org/springframework/data/r2dbc/function/query/Criteria.java

+14-15
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private Criteria(String column, Comparator comparator, @Nullable Object value) {
4646

4747
private Criteria(@Nullable Criteria previous, Combinator combinator, String column, Comparator comparator,
4848
@Nullable Object value) {
49+
4950
this.previous = previous;
5051
this.combinator = combinator;
5152
this.column = column;
@@ -56,7 +57,7 @@ private Criteria(@Nullable Criteria previous, Combinator combinator, String colu
5657
/**
5758
* Static factory method to create a Criteria using the provided {@code column} name.
5859
*
59-
* @param column
60+
* @param column Must not be {@literal null} or empty.
6061
* @return a new {@link CriteriaStep} object to complete the first {@link Criteria}.
6162
*/
6263
public static CriteriaStep where(String column) {
@@ -69,7 +70,7 @@ public static CriteriaStep where(String column) {
6970
/**
7071
* Create a new {@link Criteria} and combine it with {@code AND} using the provided {@code column} name.
7172
*
72-
* @param column
73+
* @param column Must not be {@literal null} or empty.
7374
* @return a new {@link CriteriaStep} object to complete the next {@link Criteria}.
7475
*/
7576
public CriteriaStep and(String column) {
@@ -87,7 +88,7 @@ protected Criteria createCriteria(Comparator comparator, Object value) {
8788
/**
8889
* Create a new {@link Criteria} and combine it with {@code OR} using the provided {@code column} name.
8990
*
90-
* @param column
91+
* @param column Must not be {@literal null} or empty.
9192
* @return a new {@link CriteriaStep} object to complete the next {@link Criteria}.
9293
*/
9394
public CriteriaStep or(String column) {
@@ -179,31 +180,31 @@ public interface CriteriaStep {
179180
/**
180181
* Creates a {@link Criteria} using {@code IN}.
181182
*
182-
* @param value
183+
* @param values
183184
* @return
184185
*/
185186
Criteria in(Object... values);
186187

187188
/**
188189
* Creates a {@link Criteria} using {@code IN}.
189190
*
190-
* @param value
191+
* @param values
191192
* @return
192193
*/
193194
Criteria in(Collection<? extends Object> values);
194195

195196
/**
196197
* Creates a {@link Criteria} using {@code NOT IN}.
197198
*
198-
* @param value
199+
* @param values
199200
* @return
200201
*/
201202
Criteria notIn(Object... values);
202203

203204
/**
204205
* Creates a {@link Criteria} using {@code NOT IN}.
205206
*
206-
* @param value
207+
* @param values
207208
* @return
208209
*/
209210
Criteria notIn(Collection<? extends Object> values);
@@ -251,15 +252,13 @@ public interface CriteriaStep {
251252
/**
252253
* Creates a {@link Criteria} using {@code IS NULL}.
253254
*
254-
* @param value
255255
* @return
256256
*/
257257
Criteria isNull();
258258

259259
/**
260260
* Creates a {@link Criteria} using {@code IS NOT NULL}.
261261
*
262-
* @param value
263262
* @return
264263
*/
265264
Criteria isNotNull();
@@ -314,9 +313,9 @@ public Criteria in(Object... values) {
314313
return createCriteria(Comparator.IN, Arrays.asList(values));
315314
}
316315

317-
/**
318-
* @param values
319-
* @return
316+
/*
317+
* (non-Javadoc)
318+
* @see org.springframework.data.r2dbc.function.query.Criteria.CriteriaStep#in(java.util.Collection)
320319
*/
321320
@Override
322321
public Criteria in(Collection<?> values) {
@@ -343,9 +342,9 @@ public Criteria notIn(Object... values) {
343342
return createCriteria(Comparator.NOT_IN, Arrays.asList(values));
344343
}
345344

346-
/**
347-
* @param values
348-
* @return
345+
/*
346+
* (non-Javadoc)
347+
* @see org.springframework.data.r2dbc.function.query.Criteria.CriteriaStep#notIn(java.util.Collection)
349348
*/
350349
@Override
351350
public Criteria notIn(Collection<?> values) {

src/main/java/org/springframework/data/r2dbc/function/query/QueryMapper.java

+2
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ private Condition getCondition(Criteria criteria, MutableBindings bindings, Tabl
166166
typeHint = getTypeHint(mappedValue, actualType.getType(), settableValue);
167167

168168
} else {
169+
169170
mappedValue = convertValue(criteria.getValue(), propertyField.getTypeHint());
170171
typeHint = actualType.getType();
171172
}
@@ -227,6 +228,7 @@ private Condition createCondition(Column column, @Nullable Object mappedValue, C
227228
condition = column.in(expressions.toArray(new Expression[0]));
228229

229230
} else {
231+
230232
BindMarker bindMarker = bindings.nextMarker(column.getName());
231233
Expression expression = bind(mappedValue, valueType, bindings, bindMarker);
232234

src/main/java/org/springframework/data/r2dbc/function/query/UpdateMapper.java

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import org.springframework.data.r2dbc.dialect.BindMarker;
2323
import org.springframework.data.r2dbc.dialect.BindMarkers;
24+
import org.springframework.data.r2dbc.dialect.Bindings;
2425
import org.springframework.data.r2dbc.dialect.MutableBindings;
2526
import org.springframework.data.r2dbc.domain.SettableValue;
2627
import org.springframework.data.r2dbc.function.convert.R2dbcConverter;

0 commit comments

Comments
 (0)