Commit 38a6771
committed
Model combined UNION queries as a sequence of SingleQuery's
This also pushes `union` and `singleQuery` properties down from the RegularQuery
to the new CombinedQuery interface.
This way, SingleQuery is cleaned from those unused properties.
When 3 or more SingleQueries built up a union query, it used to be modeled
as a tree where each union node added one more SingleQuery like
```
S1
UNION
S2
UNION
S3
```
was modeled as
```
RegularQuery
+-singleQuery: RegularQuery
| +-singleQuery: SingleQuery S1
| +-union:
| +-[list entry]: Union
| +-singleQuery: SingleQuery S2
+-union:
+-list entry: Union
+-singleQuery: SingleQuery S3
```
From now, the representation is as follows, where RegularQuery has 2 subclasses:
- SingleQuery used for sole queries not having any UNION clauses
- CombinedQuery used for queries that have at least one query combinator
(UNION in current openCypher, but other set combinators like INTERSECT
are about to come, see opencypher/openCypher#227)
```
CombinedQuery
+-singleQuery: SingleQuery S1
+-union:
+-[list entry]: Union
+-singleQuery: SingleQuery S2
+-[list entry]: Union
+-singleQuery: SingleQuery S3
```1 parent abe9746 commit 38a6771
File tree
4 files changed
+37
-24
lines changed- plugins
- org.slizaa.neo4j.opencypher.ui/src/org/slizaa/neo4j/opencypher/ui/outline
- org.slizaa.neo4j.opencypher
- model/generated
- src/org/slizaa/neo4j/opencypher
4 files changed
+37
-24
lines changedLines changed: 24 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
49 | 60 | | |
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 27 | + | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
456 | 451 | | |
457 | 452 | | |
458 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| |||
339 | 336 | | |
340 | 337 | | |
341 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments