Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document LET #1207

Open
wants to merge 5 commits into
base: cypher-25
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
** xref:clauses/filter.adoc[]
** xref:clauses/finish.adoc[]
** xref:clauses/foreach.adoc[]
** xref:clauses/let.adoc[]
** xref:clauses/limit.adoc[]
** xref:clauses/load-csv.adoc[]
** xref:clauses/match.adoc[]
Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/images/let_clause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ For example, GQL’s graph reference values `CURRENT_GRAPH` and `CURRENT_PROPERT
| xref:clauses/filter.adoc[`FILTER`]
|

| GQ09
| `LET` statement
| xref:clauses/let.adoc[`LET`]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: There is a caveat to this, since there is a sub-functionality which we do not support, cf. Appendix of the CIP. However, that is much in the detail and other implementation do not support that either. Additionally, I am trying to make this bit optional in the standard. Bottom line: I would not change anything here at this point, but we may want to in the future (e.g. when making it optional in the standard fails).

|

| GQ13
| `ORDER BY` and page statement: `LIMIT`
| xref:clauses/limit.adoc[`LIMIT`], xref:clauses/order-by.adoc[`ORDER BY`]
Expand Down
21 changes: 13 additions & 8 deletions modules/ROOT/pages/clauses/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,26 @@ The returned expressions may all be aliased using `AS`.
|===
| Clause | Description

m| xref::clauses/return.adoc[RETURN ... [AS]]
| Defines what to include in the query result set.

m| xref::clauses/with.adoc[WITH ... [AS]]
| Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next.

m| xref::clauses/unwind.adoc[UNWIND ... [AS]]
| Expands a list into a sequence of rows.
m| xref::clauses/let.adoc[LET]
| Assigns expressions to variables.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More correct is that the results of expressions are assigned to that variables.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you could say something like "defines additional variables" or "binds additional variables". Not sure I like these more. Just throwing out ideas.

label:new[Introduced in Neo4j 2025.03]

m| xref::clauses/filter.adoc[FILTER]
| Adds filters to queries.
label:new[Introduced in Neo4j 2025.03]
Comment on lines 42 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't saw this on the FILTER review, but I think this FILTER is in the wrong section, since it does not project anything. Reading clauses is probably better.


m| xref::clauses/finish.adoc[FINISH]
| Defines a query to have no result.

m| xref::clauses/return.adoc[RETURN ... [AS]]
| Defines what to include in the query result set.

m| xref::clauses/unwind.adoc[UNWIND ... [AS]]
| Expands a list into a sequence of rows.

m| xref::clauses/with.adoc[WITH ... [AS]]
| Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next.

|===

[[reading-sub-clauses]]
Expand Down
Loading