Skip to content

Commit 7aa7ae3

Browse files
Clarify YIELD (#1157)
Co-authored-by: Therese Magnusson <[email protected]>
1 parent fb1945b commit 7aa7ae3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/ROOT/pages/clauses/call.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ CALL db.labels() YIELD *
189189
If the procedure has deprecated return columns, those columns are also returned.
190190
191191
Note that `YIELD *` is only valid in standalone procedure calls.
192+
Variables must be explicitly named in a `YIELD` clause if other clauses than a single procedure `CALL` are present.
193+
This restriction simplifies query logic and protects against output variables from the procedure accidentally clashing with other query variables.
192194
For example, the following is not valid:
193195
194196
.Not allowed
@@ -204,7 +206,7 @@ RETURN count(*) AS results
204206
====
205207
206208
`YIELD` can be used to filter for specific results.
207-
This requires knowing the names of the arguments within a procedure's signature, which can either be found in the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/[Operations Manual -> Procedures] or returned by a `SHOW PROCEDURES` query.
209+
This requires knowing the names of the arguments within a procedure's signature, which can either be found in the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/[Operations Manual -> Procedures] or in the `signature` column returned by a `SHOW PROCEDURES` command (see example below).
208210
209211
.Find the argument names of `db.propertyKeys`
210212
[source, cypher]

0 commit comments

Comments
 (0)