You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/asciidoc/reference/r2dbc.adoc
+9-6
Original file line number
Diff line number
Diff line change
@@ -459,13 +459,16 @@ db.execute()
459
459
460
460
.R2DBC Native Bind Markers
461
461
****
462
-
R2DBC uses database-native bind markers that depend on the actual database.
463
-
If you are familiar with JDBC, then you're also familiar with `?` (question mark) bind markers.
464
-
JDBC drivers translate question mark bind markers to database-native markers as part of statement execution.
462
+
R2DBC uses database-native bind markers that depend on the actual database vendor.
463
+
As an example, Postgres uses indexed markers such as `$1`, `$2`, `$n`.
464
+
Another example is SQL Server that uses named bind markers prefixed with `@` (at).
465
465
466
-
Postgres uses indexed markers (`$1`, `$2`), SQL Server uses named bind markers prefixed with `@` as its native bind marker syntax.
467
-
Spring Data R2DBC leverages `Dialect` implementations to expand named parameters to native bind markers at the time of query execution which gives you a certain degree of query portability across various database vendors.
468
-
You can still use native bind markers if you prefer to do so.
466
+
This is different from JDBC which requires `?` (question mark) as bind markers.
467
+
In JDBC, the actual drivers translate question mark bind markers to database-native markers as part of their statement execution.
468
+
469
+
Spring Data R2DBC allows you to use native bind markers or named bind markers with the `:name` syntax.
470
+
471
+
Named parameter support leverages ``Dialect``s to expand named parameters to native bind markers at the time of query execution which gives you a certain degree of query portability across various database vendors.
469
472
****
470
473
471
474
The query-preprocessor unrolls named `Collection` parameters into a series of bind markers to remove the need of dynamic query creation based on the number of arguments.
0 commit comments