Skip to content

Clauses and subclauses #1272

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

Draft
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

JPryce-Aklundh
Copy link
Collaborator

No description provided.


[[query-order]]
= ORDER BY

`ORDER BY` specifies how the output of a clause should be sorted.
It be used as a sub-clause following `RETURN` or `WITH`.
It be used as a subclause following `RETURN` or `WITH`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
It be used as a subclause following `RETURN` or `WITH`.
It is used as a subclause following `RETURN` or `WITH`.

Comment on lines 277 to 281
RETURN COLLECT {
MATCH (person)-[:HAS_DOG]->(d:Dog)
RETURN d.name } AS dogNames,
avg(person.age) AS averageAge
ORDER BY dogNames
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RETURN COLLECT {
MATCH (person)-[:HAS_DOG]->(d:Dog)
RETURN d.name } AS dogNames,
avg(person.age) AS averageAge
ORDER BY dogNames
RETURN COLLECT {
MATCH (person)-[:HAS_DOG]->(d:Dog)
RETURN d.name
} AS dogNames,
avg(person.age) AS averageAge
ORDER BY dogNames

Copy link
Contributor

Choose a reason for hiding this comment

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

the ending curly was very hard to spot

MATCH (person)-[:HAS_DOG]->(:Dog)
RETURN person.name AS name,
EXISTS {
MATCH (person)-[:HAS_DOG]->(:Dog)
} AS hasDog
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} AS hasDog
} AS hasDog

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure about the correct amount of spaces, but i think this should be at the same level of the E from EXISTS, letting the curly end nicely

= Graph selection clauses
:description: Information about Cypher's graph selection clauses.

Cypher's contains one graph selection clause -- `USE` -- which allows you to select which graph a query, or query part, is executed against.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Cypher's contains one graph selection clause -- `USE` -- which allows you to select which graph a query, or query part, is executed against.
Cypher contains one graph selection clause -- `USE` -- which allows you to select which graph a query, or query part, is executed against.

i'd say it's preference, but maybe "a" (or even "a single") instead of "one"?

= Import clauses
:description: Information about Cypher's import clauses.

Cypher's contains one clause to import data -- `LOAD CSV` -- which allows you to load csv into a graph.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Cypher's contains one clause to import data -- `LOAD CSV` -- which allows you to load csv into a graph.
Cypher contains one clause to import data -- `LOAD CSV` -- which allows you to load csv into a graph.

same here (a vs a single vs one)

@@ -3,291 +3,26 @@
[[query-clause]]
= Clauses

This section contains information on all the clauses in the Cypher query language.
This chapter contains information on all the clauses and subclauses in the Cypher query language (with the exception of the database administration commands, which are documented in the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/[Operations Manual -> Database administration], link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/[Authentication and authorization], and link:{neo4j-docs-base-uri}/operations-manual/current/clustering/[Clustering]).
Copy link
Contributor

Choose a reason for hiding this comment

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

style preference - i'd drop the parentheses

@stefano-ottolenghi stefano-ottolenghi changed the base branch from cypher-25 to dev June 17, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants