Skip to content

Commit 38311c9

Browse files
committed
Polishing.
1 parent 9336d09 commit 38311c9

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

Diff for: src/main/asciidoc/reference/r2dbc-core.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ You also need a main application to run, as follows:
116116
====
117117
[source,java,indent=0]
118118
----
119-
include::../{example-root}/R2dbcApp.java[tags=class]
119+
include::../{example-root}/R2dbcApp.java[tag=class]
120120
----
121121
====
122122

Diff for: src/main/asciidoc/reference/r2dbc-template.adoc

+12-13
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following example shows how to insert a row and retrieving its contents:
3131
====
3232
[source,java,indent=0]
3333
----
34-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=insertAndSelect]
34+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=insertAndSelect]
3535
----
3636
====
3737

@@ -56,7 +56,7 @@ This functionality is supported by the <<r2dbc.drivers,`R2dbcDialect` abstractio
5656
====
5757
[source,java,indent=0]
5858
----
59-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=select]
59+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=select]
6060
----
6161
====
6262

@@ -69,10 +69,9 @@ Consider the following simple query:
6969
====
7070
[source,java,indent=0]
7171
----
72-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=simpleSelect]
72+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=simpleSelect]
7373
----
74-
<1> Using `Person` with the `from(…)` method sets the `FROM` table based on mapping metadata.
75-
It also maps tabular results on `Person` result objects.
74+
<1> Using `Person` with the `select(…)` method maps tabular results on `Person` result objects.
7675
<2> Fetching `all()` rows returns a `Flux<Person>` without limiting results.
7776
====
7877

@@ -81,7 +80,7 @@ The following example declares a more complex query that specifies the table nam
8180
====
8281
[source,java,indent=0]
8382
----
84-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=fullSelect]
83+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=fullSelect]
8584
----
8685
<1> Selecting from a table by name returns row results using the given domain type.
8786
<2> The issued query declares a `WHERE` condition on `firstname` and `lastname` columns to filter results.
@@ -142,7 +141,7 @@ Consider the following simple typed insert operation:
142141
====
143142
[source,java,indent=0]
144143
----
145-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=insert]
144+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=insert]
146145
----
147146
<1> Using `Person` with the `into(…)` method sets the `INTO` table, based on mapping metadata.
148147
It also prepares the insert statement to accept `Person` objects for inserting.
@@ -165,12 +164,12 @@ Consider the following simple typed update operation:
165164
----
166165
Person modified = …
167166
168-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=update]
167+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=update]
169168
----
170169
<1> Update `Person` objects and apply mapping based on mapping metadata.
171170
<2> Set a different table name by calling the `inTable(…)` method.
172-
<2> Specify a query that translates into a `WHERE` clause.
173-
<3> Apply the `Update` object.
171+
<3> Specify a query that translates into a `WHERE` clause.
172+
<4> Apply the `Update` object.
174173
Set in this case `age` to `42` and return the number of affected rows.
175174
====
176175

@@ -185,10 +184,10 @@ Consider the following simple insert operation:
185184
====
186185
[source,java]
187186
----
188-
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tags=delete]
187+
include::../{example-root}/R2dbcEntityTemplateSnippets.java[tag=delete]
189188
----
190189
<1> Delete `Person` objects and apply mapping based on mapping metadata.
191190
<2> Set a different table name by calling the `from(…)` method.
192-
<2> Specify a query that translates into a `WHERE` clause.
193-
<3> Apply the delete operation and return the number of affected rows.
191+
<3> Specify a query that translates into a `WHERE` clause.
192+
<4> Apply the delete operation and return the number of affected rows.
194193
====

Diff for: src/test/java/org/springframework/data/r2dbc/documentation/Person.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ public String toString() {
4545
return "Person [id=" + id + ", name=" + name + ", age=" + age + "]";
4646
}
4747
}
48-
// end::class[]}
48+
// end::class[]

Diff for: src/test/java/org/springframework/data/r2dbc/documentation/R2dbcApp.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ public static void main(String[] args) {
5757
.verifyComplete();
5858
}
5959
}
60-
// tag::class[]
60+
// end::class[]

Diff for: src/test/java/org/springframework/data/r2dbc/documentation/R2dbcEntityTemplateSnippets.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void simpleSelect(R2dbcEntityTemplate template) {
5656

5757
// tag::simpleSelect[]
5858
Flux<Person> people = template.select(Person.class) // <1>
59-
.all();
59+
.all(); // <2>
6060
// end::simpleSelect[]
6161
}
6262

0 commit comments

Comments
 (0)