diff --git a/modules/ROOT/pages/appendix/gql-conformance/index.adoc b/modules/ROOT/pages/appendix/gql-conformance/index.adoc index 438f89042..96f4487e8 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/index.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/index.adoc @@ -1,8 +1,8 @@ :description: Overview of Cypher's conformance to GQL. = GQL conformance -*Last updated*: 24 October 2024 + -*Neo4j version*: 5.25 +*Last updated*: 13 November 2024 + +*Neo4j version*: 2025.01 GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases. diff --git a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc index 6a8299b0e..df489c10e 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc @@ -28,6 +28,11 @@ The below table is instead listed in order of their appearance in the link:https Cypher supports the boolean type predicate for `TRUE`, `FALSE`, and `NULL` but does not support the GQL keyword `UNKNOWN`. +| 9.1 +| +| xref:clauses/union.adoc#combining-union-and-union-all[Combining `UNION` and `UNION ALL`]. +| + | 13.2 | | xref:clauses/create.adoc#insert-as-synonym-of-create[`INSERT`] diff --git a/modules/ROOT/pages/clauses/union.adoc b/modules/ROOT/pages/clauses/union.adoc index b193a7786..218ba8745 100644 --- a/modules/ROOT/pages/clauses/union.adoc +++ b/modules/ROOT/pages/clauses/union.adoc @@ -124,6 +124,41 @@ The combined result is returned, without duplicates. |Rows: 3 |=== +[role=label--new-2025.02] +[[combining-union-and-union-all]] +== Combining UNION and UNION ALL + +To combine `UNION` (or `UNION DISTINCT`) and `UNION ALL` in the same query, enclose one or more `UNION` operations of the same type in curly braces. +This allows the enclosed query to act as an argument that can be combined with an outer `UNION` operation of any type. + +.Combine `UNION` and `UNION ALL` using curly braces +[source, cypher] +---- +{ + MATCH (n:Actor) + RETURN n.name AS name + UNION + MATCH (n:Director) + RETURN n.name AS name +} +UNION ALL +MATCH (n:Movie) +RETURN n.title AS name +---- + +The combined result is returned. + +.Result +[role="queryresult",options="header,footer",cols="1*