Skip to content

Commit

Permalink
clarify yield
Browse files Browse the repository at this point in the history
  • Loading branch information
JPryce-Aklundh committed Jan 13, 2025
1 parent e1047a2 commit d1e5a3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/ROOT/pages/clauses/call.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ CALL db.labels() YIELD *
If the procedure has deprecated return columns, those columns are also returned.
Note that `YIELD *` is only valid in standalone procedure calls.
Variables must be explicitly named in a `YIELD` clause if other clauses than `CALL` are present.
This restriction simplifies query logic and protects against issues caused by potential new columns added to a procedure.
For example, the following is not valid:
.Not allowed
Expand All @@ -204,7 +206,7 @@ RETURN count(*) AS results
====
`YIELD` can be used to filter for specific results.
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.
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 the `signature` column returned in a `SHOW PROCEDURES` query.
.Find the argument names of `db.propertyKeys`
[source, cypher]
Expand Down

0 comments on commit d1e5a3e

Please sign in to comment.