-
Notifications
You must be signed in to change notification settings - Fork 64
Not a path pattern expression #1431
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
base: dev
Are you sure you want to change the base?
Conversation
acdd42a to
8b4efc1
Compare
|
This PR includes documentation updates New pages: Updated pages: |
Lojjs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice new content, just some minor feedback
| 2+d|Rows: 5 | ||
| |=== | ||
|
|
||
| When '<exp>', then the label expression predicate results in `null`, e.g. if `p` is `null`, then `p:!CEO` results in `null`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like something is missing here, it should not say just When '<exp>' right?
| ---- | ||
| CYPHER 25 | ||
| MATCH ()-[r]->(p:Person) | ||
| UNWIND labels(p) AS label | ||
| FILTER label <> "Person" | ||
| RETURN COLLECT(label) AS managerLabels | ||
| NEXT | ||
| MATCH (p) | ||
| RETURN p.name AS name, p:$any(managerLabels) AS isManager | ||
| ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice query :)
| 2+d|Rows: 5 | ||
| |=== | ||
|
|
||
| If `r` is `null`, then the label expression predicate, e.g. `r:WORKS_FOR|REPORTS_TO` results in `null`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you should add the sentence about using coalesce to change nulls to default values here as well. Having read the whole page it is clear, but if someone is looking at this example only it might be a bit confusing that this sentence mentions null and the result below does not
| RETURN employee.name AS employee, (p:Person) AS workForAPeron | ||
| ---- | ||
|
|
||
| The above query has the same result as teh query that used `p:Person` in stead of `(p:Person)`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The above query has the same result as teh query that used `p:Person` in stead of `(p:Person)`: | |
| The above query has the same result as the query that used `p:Person` instead of `(p:Person)`: |
| ---- | ||
| MATCH (employee:Person)-[:WORKS_FOR]->(p) | ||
| WHERE p:Person | ||
| RETURN employee.name AS employee, p:Person AS workForAPeron |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| RETURN employee.name AS employee, p:Person AS workForAPeron | |
| RETURN employee.name AS employee, p:Person AS workForAPerson |
| .Result | ||
| [role="queryresult",options="header,footer",cols="2*<m"] | ||
| |=== | ||
| | employee | workForAPeron |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | employee | workForAPeron | |
| | employee | workForAPerson |
| [source, error] | ||
| ---- | ||
| Invalid input 'Node' for `p`. Expected to be Boolean. | ||
| ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary for this PR, but we should maybe think about starting to use the GQL errors in the Cypher manual instead.
This adds some documentation about potential confusion of some parenthesized expression with path pattern expressions.
While doing so, I could not find documentation of the label expression predicate, so I add some too.
The new SVG, is a manually edit copy of another. I do not have an SVG editor handy, so I was a bit limited. If you have better tools feel free to adjust, of course.
Fixes SURF-165