Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3ea3b53
Remove EXISTS as a function name
hvub Jun 4, 2021
76226dd
Remove EXISTS as a function name
hvub Jun 4, 2021
ab43947
Add production ExistentialSubquery
hvub Jun 4, 2021
e76ad49
Add non-terminal ExistentialSubquery as alternative to Atom
hvub Jun 4, 2021
c6c4caa
Rename CaseAlternatives to CaseAlternative
hvub Jun 7, 2021
62b48e0
Reuse <Where> in <PatternComprehension> for more consistency
hvub Jun 7, 2021
0eb3b60
First draft updating the CIP
hvub Jun 7, 2021
1399839
Fix grammar ambiguity bug
hvub Jun 7, 2021
0f97ded
Turn `exists(map.field)` into `map.field IS NOT NULL`
hvub Jun 8, 2021
32aefb8
Turn `exists(map.field)` into `map.field IS NOT NULL`
hvub Jun 8, 2021
e7782cb
Turn `exists(map.field)` into `map.field IS NOT NULL`
hvub Jun 8, 2021
ede07fb
Turn `exists(...)` into `... IS NOT NULL`
hvub Jun 8, 2021
9a9150c
Turn `exists(...)` into `... IS NOT NULL`
hvub Jun 8, 2021
e29d795
Turn `exists(...)` into `... IS NOT NULL`
hvub Jun 8, 2021
4950b42
Turn `exists(...)` into `... IS NOT NULL`
hvub Jun 8, 2021
e199365
Refine wording, fixing some typos and formatting
hvub Jun 8, 2021
12dbb9f
not use `exists`as variable name (reserved word)
hvub Jun 8, 2021
5a2b853
RelationshipsPattern -> RelationshipPattern
hvub Jun 8, 2021
9b53e94
editorials and new grammar linking
hvub Jun 8, 2021
248e3ce
RelationshipPattern -> RelationshipsPattern
hvub Jun 8, 2021
4e87bde
RelationshipPattern -> RelationshipsPattern
hvub Jun 8, 2021
31a0bef
move "IS NOT NULL is case insensitive" scenarios
hvub Jun 10, 2021
91f9d22
Add/extend scenarios testing IS [NOT] NULL on maps
hvub Jun 10, 2021
f994d19
Add/extend scenarios testing map field access with regards to null an…
hvub Jun 10, 2021
75c24aa
Remove `Map4 - Field existence check` (no dedicate functionality anym…
hvub Jun 10, 2021
5ec66f6
Add scenario for property/field existence check via `keys()` and `IN`
hvub Jun 10, 2021
3b424e3
bug fix
hvub Jun 10, 2021
aba4da9
Extend and align scenarios on static property/field access
hvub Jun 10, 2021
f56edb9
Remove `Graph9 - Property existence check` (no dedicated functionalit…
hvub Jun 10, 2021
4f3a475
bug fix
hvub Jun 10, 2021
e3b9679
bug fix
hvub Jun 10, 2021
127ea25
bug fix
hvub Jun 10, 2021
6b48569
bug fix
hvub Jun 10, 2021
9dfa6e3
accept suggestion from review
hvub Jun 11, 2021
16d844e
Update cip/1.accepted/CIP2015-05-13-EXISTS.adoc
hvub Jun 11, 2021
0410a1a
accept suggestion from review
hvub Jun 11, 2021
3c18456
accept suggestion from review
hvub Jun 11, 2021
eab2366
accept suggestion from review
hvub Jun 11, 2021
961affb
accept suggestion from review
hvub Jun 11, 2021
bf40a94
accept suggestion from review
hvub Jun 11, 2021
caa90a4
accept suggestion from review
hvub Jun 11, 2021
d7676fd
accept suggestion from review
hvub Jun 11, 2021
e2434ad
accept suggestion from review
hvub Jun 11, 2021
27579e6
add commas to grammar in cip
hvub Jun 11, 2021
72144e3
accept suggestion from review
hvub Jun 11, 2021
c423671
accept suggestion from review
hvub Jun 11, 2021
a842a3b
fix wording
hvub Jun 11, 2021
3fef5ba
fix wording
hvub Jun 11, 2021
5dc1466
add informative note
hvub Jun 11, 2021
a5c6c36
Accept suggestion
hvub Jun 15, 2021
0550779
Accept suggestion
hvub Jun 15, 2021
f256b3a
Add missing links
hvub Jun 15, 2021
cd9bf2f
Add missing place allowing a naked pattern
hvub Jun 15, 2021
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
192 changes: 139 additions & 53 deletions cip/1.accepted/CIP2015-05-13-EXISTS.adoc

Large diffs are not rendered by default.

22 changes: 15 additions & 7 deletions grammar/basic-grammar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@
<non-terminal ref="RelationshipsPattern"/>
<non-terminal ref="ParenthesizedExpression"/>
<non-terminal ref="FunctionInvocation"/>
<non-terminal ref="ExistentialSubquery"/>
&var;
</alt>
</production>
Expand Down Expand Up @@ -387,13 +388,20 @@
</production>

<production name="FunctionName" rr:inline="true">
<non-terminal ref="Namespace" rr:title="function namespace"/>
<non-terminal ref="SymbolicName" rr:title="function name"/>
</production>

<production name="ExistentialSubquery">
EXISTS &WS; { &WS;
<alt>
<non-terminal ref="RegularQuery" rr:title="full existential subquery"/>
<seq>
<non-terminal ref="Namespace" rr:title="function namespace"/>
<non-terminal ref="SymbolicName" rr:title="function name"/>
<non-terminal ref="Pattern"/>
<opt>&WS; <non-terminal ref="Where"/></opt>
</seq>
EXISTS
</alt>
&WS; }
</production>

<production name="ExplicitProcedureInvocation">
Expand Down Expand Up @@ -433,7 +441,7 @@
[ &WS;
<opt><non-terminal ref="Variable"/> &WS; = &WS;</opt>
<non-terminal ref="RelationshipsPattern"/> &WS;
<opt>WHERE &WS; <non-terminal ref="Expression"/> &WS;</opt>
<opt><non-terminal ref="Where"/> &WS;</opt>
| &WS; <non-terminal ref="Expression"/> &WS;
]
</production>
Expand All @@ -447,14 +455,14 @@

<production name="CaseExpression">
<alt>
<seq>CASE <repeat min="1">&WS; <non-terminal ref="CaseAlternatives"/></repeat></seq>
<seq>CASE &WS; &expr; <repeat min="1">&WS; <non-terminal ref="CaseAlternatives"/></repeat></seq>
<seq>CASE <repeat min="1">&WS; <non-terminal ref="CaseAlternative"/></repeat></seq>
<seq>CASE &WS; &expr; <repeat min="1">&WS; <non-terminal ref="CaseAlternative"/></repeat></seq>
</alt>
<opt>&WS; ELSE &WS; &expr;</opt>
&WS; END
</production>

<production name="CaseAlternatives" rr:inline="true">
<production name="CaseAlternative" rr:inline="true">
WHEN &WS; &expr; &WS; THEN &WS; &expr;
</production>

Expand Down
4 changes: 2 additions & 2 deletions tck/features/clauses/match-where/MatchWhere5.feature
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Feature: MatchWhere5 - Filter on predicate resulting in null
When executing query:
"""
MATCH (:Root {name: 'x'})-->(i:TextNode)
WHERE i.var > 'te' AND exists(i.var)
WHERE i.var > 'te' AND i.var IS NOT NULL
RETURN i
"""
Then the result should be, in any order:
Expand All @@ -106,7 +106,7 @@ Feature: MatchWhere5 - Filter on predicate resulting in null
When executing query:
"""
MATCH (:Root {name: 'x'})-->(i)
WHERE i.var > 'te' OR exists(i.var)
WHERE i.var > 'te' OR i.var IS NOT NULL
RETURN i
"""
Then the result should be, in any order:
Expand Down
4 changes: 2 additions & 2 deletions tck/features/clauses/remove/Remove1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feature: Remove1 - Remove a Property
"""
MATCH (n)
REMOVE n.num
RETURN exists(n.num) AS still_there
RETURN n.num IS NOT NULL AS still_there
"""
Then the result should be, in any order:
| still_there |
Expand Down Expand Up @@ -76,7 +76,7 @@ Feature: Remove1 - Remove a Property
"""
MATCH ()-[r]->()
REMOVE r.num
RETURN exists(r.num) AS still_there
RETURN r.num IS NOT NULL AS still_there
"""
Then the result should be, in any order:
| still_there |
Expand Down
6 changes: 3 additions & 3 deletions tck/features/clauses/return/Return3.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Feature: Return3 - Return multiple expressions (if column order correct)
When executing query:
"""
MATCH (a)
RETURN exists(a.id), a IS NOT NULL
RETURN a.id IS NOT NULL AS a, a IS NOT NULL AS b
"""
Then the result should be, in any order:
| exists(a.id) | a IS NOT NULL |
| false | true |
| a | b |
| false | true |
And no side effects

Scenario: [2] Returning multiple node property values
Expand Down
4 changes: 2 additions & 2 deletions tck/features/clauses/with-where/WithWhere5.feature
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Feature: WithWhere5 - Filter on predicate resulting in null
"""
MATCH (:Root {name: 'x'})-->(i:TextNode)
WITH i
WHERE i.var > 'te' AND exists(i.var)
WHERE i.var > 'te' AND i.var IS NOT NULL
RETURN i
"""
Then the result should be, in any order:
Expand All @@ -110,7 +110,7 @@ Feature: WithWhere5 - Filter on predicate resulting in null
"""
MATCH (:Root {name: 'x'})-->(i)
WITH i
WHERE i.var > 'te' OR exists(i.var)
WHERE i.var > 'te' OR i.var IS NOT NULL
RETURN i
"""
Then the result should be, in any order:
Expand Down
4 changes: 2 additions & 2 deletions tck/features/expressions/comparison/Comparison2.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Feature: Comparison2 - Half-bounded Range
When executing query:
"""
MATCH (:Root)-->(i:Child)
WHERE exists(i.var) AND i.var > 'x'
WHERE i.var IS NOT NULL AND i.var > 'x'
RETURN i.var
"""
Then the result should be, in any order:
Expand All @@ -60,7 +60,7 @@ Feature: Comparison2 - Half-bounded Range
When executing query:
"""
MATCH (:Root)-->(i:Child)
WHERE NOT exists(i.var) OR i.var > 'x'
WHERE i.var IS NULL OR i.var > 'x'
RETURN i.var
"""
Then the result should be, in any order:
Expand Down
111 changes: 0 additions & 111 deletions tck/features/expressions/graph/Graph10.feature

This file was deleted.

Loading