Skip to content

Commit 2178eff

Browse files
committed
Merge branch '3.8-dev'
2 parents 939ac79 + fa3159a commit 2178eff

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

docs/src/dev/future/proposal-declarative-match-step-9.asciidoc

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,19 @@ reference ANTLR4 grammar for the default GQL dialect.
7373
7474
=== 4. Parameterization
7575
76-
To prevent query injection and improve performance by enabling query
77-
plan caching, parameterized queries are supported. Parameters are
78-
supplied using the existing `with()` modulator with a special key
79-
convention.
80-
81-
* *Convention:* A key in a `with()` modulator that is prefixed with a
82-
dollar sign (`$`) will be treated as a query parameter for the `match()`
83-
step. The prefix is removed to derive the parameter name.
76+
Parameterized queries are supported to prevent query injection and improve performance by enabling query
77+
plan caching. If such exist, parameters are
78+
supplied using the `Map` argument as part of the match query step.
79+
8480
* *Example:*
8581
+
8682
[source,groovy]
8783
----
88-
g.match("MATCH (p:Person WHERE p.name = $personName)")
89-
.with("$personName", "Stephen")
84+
g.match("MATCH (p:Person WHERE p.name = $personName)", Map.of("personName", "Stephen"))
9085
----
9186
92-
This approach unifies parameter handling, allowing parameters to be
93-
defined locally for a specific `match()` step or globally on the
94-
`GraphTraversalSource`. If parameters are not explicitly provided via
95-
`with()`, an implicit lookup on remote server bindings may be performed.
87+
If parameters are not explicitly provided via
88+
`Map`, an implicit lookup on remote server bindings may be performed.
9689
9790
'''''
9891

0 commit comments

Comments
 (0)