From 301e9239befc80f71b7023648f92298faab7c491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:37:14 +0100 Subject: [PATCH 1/4] update to graph.byelementid --- .../appendix/gql-conformance/additional-cypher.adoc | 5 ++++- ...precations-additions-removals-compatibility.adoc | 12 ++++++++++++ modules/ROOT/pages/functions/graph.adoc | 13 +++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc b/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc index 6731cb737..1b90fcbad 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc @@ -206,7 +206,10 @@ REMOVE n:$($label) | Description | xref:functions/graph.adoc#functions-graph-by-elementid[`graph.byElementId()`] -| Returns the graph reference with the given element id. It is only supported in the `USE` clause, on composite databases. +| Returns the graph reference with the given element id. +It is only supported in the `USE` clause. +As of Neo4j 5.26, it is supported on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. +On earlier versions, it is only supported on composite databases. | xref:functions/graph.adoc#functions-graph-byname[`graph.byName()`] | Returns the graph reference of the given name. It is only supported in the `USE` clause, on composite databases. diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 432f5b253..20a06a0cf 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -160,6 +160,18 @@ For more information on the deprecation of these formats, see link:{neo4j-docs-b | Feature | Details +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +USE graph.byElementId("4:c0a65d96-4993-4b0c-b036-e7ebd9174905:0") +MATCH (n) RETURN n +---- + +| xref:functions/graph.adoc#functions-graph-by-elementid[`graph.byElementId()`] can now be used on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. +Previously it could only be used on composite databases. + a| label:functionality[] label:updated[] diff --git a/modules/ROOT/pages/functions/graph.adoc b/modules/ROOT/pages/functions/graph.adoc index 85f7fd526..fc3d1e7f9 100644 --- a/modules/ROOT/pages/functions/graph.adoc +++ b/modules/ROOT/pages/functions/graph.adoc @@ -144,12 +144,18 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA .Details |=== | *Syntax* 3+| `graph.byName(name)` -| *Description* 3+| Returns the graph reference of the given name. It is only supported in the `USE` clause, on composite databases. +| *Description* 3+| Returns the graph reference of the given name. .2+| *Arguments* | *Name* | *Type* | *Description* | `name` | `STRING` | The name of the graph to be resolved. | *Returns* 3+| `GRAPH` |=== + +.Considerations +|=== +| `graph.byName()` is only supported in the `USE` clause, on composite databases. +|=== + .+graph.byName()+ ====== @@ -183,7 +189,8 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA .Details |=== | *Syntax* 3+| `graph.byElementId(elementId)` -| *Description* 3+| Returns the graph reference with the given element id. It is only supported in the `USE` clause, on composite databases. +| *Description* 3+| Returns the graph reference with the given element id. +It is only supported in the `USE` clause. .2+| *Arguments* | *Name* | *Type* | *Description* | `elementId` | `STRING` | An element id of a node or relationship. | *Returns* 3+| `GRAPH` @@ -192,6 +199,8 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA .Considerations |=== | If the constituent database is not a standard database in the DBMS, an error will be thrown. +| As of Neo4j 5.26, `graph.byElementId()` is supported on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. +On earlier versions, it is only supported on composite databases. |=== .+graph.byElementId()+ From 4d4991fd862f9a44781e5f43c0ed2b1d631b267c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:42:30 +0100 Subject: [PATCH 2/4] fix --- .../pages/appendix/gql-conformance/additional-cypher.adoc | 2 +- modules/ROOT/pages/functions/graph.adoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc b/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc index 1b90fcbad..32f648563 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/additional-cypher.adoc @@ -207,7 +207,7 @@ REMOVE n:$($label) | xref:functions/graph.adoc#functions-graph-by-elementid[`graph.byElementId()`] | Returns the graph reference with the given element id. -It is only supported in the `USE` clause. +It is only supported in the xref:clauses/use.adoc[`USE`] clause. As of Neo4j 5.26, it is supported on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. On earlier versions, it is only supported on composite databases. diff --git a/modules/ROOT/pages/functions/graph.adoc b/modules/ROOT/pages/functions/graph.adoc index fc3d1e7f9..47a701d79 100644 --- a/modules/ROOT/pages/functions/graph.adoc +++ b/modules/ROOT/pages/functions/graph.adoc @@ -153,7 +153,7 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA .Considerations |=== -| `graph.byName()` is only supported in the `USE` clause, on composite databases. +| `graph.byName()` is only supported in the xref:clauses/use.adoc[`USE`] clause, on composite databases. |=== .+graph.byName()+ @@ -190,7 +190,6 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA |=== | *Syntax* 3+| `graph.byElementId(elementId)` | *Description* 3+| Returns the graph reference with the given element id. -It is only supported in the `USE` clause. .2+| *Arguments* | *Name* | *Type* | *Description* | `elementId` | `STRING` | An element id of a node or relationship. | *Returns* 3+| `GRAPH` @@ -199,6 +198,7 @@ It is only supported in the `USE` clause. .Considerations |=== | If the constituent database is not a standard database in the DBMS, an error will be thrown. +| `graph.byElementId()` is only supported in the xref:clauses/use.adoc[`USE`] clause. | As of Neo4j 5.26, `graph.byElementId()` is supported on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. On earlier versions, it is only supported on composite databases. |=== From e2a3f0373e1bcfc7bf0cf6368b40a244d3ab0618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:14:44 +0100 Subject: [PATCH 3/4] update --- modules/ROOT/pages/clauses/use.adoc | 14 ++++++++++---- modules/ROOT/pages/functions/graph.adoc | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/clauses/use.adoc b/modules/ROOT/pages/clauses/use.adoc index 29c744c72..70c4f87d3 100644 --- a/modules/ROOT/pages/clauses/use.adoc +++ b/modules/ROOT/pages/clauses/use.adoc @@ -93,7 +93,7 @@ MATCH (n) RETURN n [[query-use-examples-query-composite-database-constituent-graph-dynamically]] === Query a composite database constituent graph dynamically -The built-in function `graph.byName()` can be used in the `USE` clause to resolve a constituent graph from a `STRING` value containing the qualified name of a constituent. +The xref:functions/graph.adoc#functions-graph-byname[`graph.byName()`] function can be used in the `USE` clause to resolve a constituent graph from a `STRING` value containing the qualified name of a constituent. This example uses a composite database named `myComposite` that includes an alias named `myConstituent`: @@ -114,12 +114,18 @@ USE graph.byName($graphName) MATCH (n) RETURN n ---- +[role=label--new-5.13] [[query-use-examples-query-composite-database-by-element-id]] === Query a composite database constituent using elementId -The `graph.byElementId()` function (introduced in Neo4j 5.13), can be used in the `USE` clause to resolve a constituent graph to which a given element id belongs. -In the below example, it is assumed that the DBMS contains a composite database constituent, which contains the element id `4:c0a65d96-4993-4b0c-b036-e7ebd9174905:0`. -If the constituent database is not a standard database in the DBMS an error will be thrown: +The xref:functions/graph.adoc#functions-graph-by-elementid[`graph.byElementId()`] function can be used in the `USE` clause to resolve a constituent graph to which a given xref:functions/scalar.adoc#functions-elementid[element id] belongs. +As of Neo4j 5.26, it is supported on both standard and composite databases (on previous versions it is only available on composite databases). + +[NOTE] +A USE clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id. + +In the below example, it is assumed that the DBMS contains the database corresponding to the given element id. If you are connected to a composite database it needs to be a element id to a constituent database, which is a standard database in the DBMS. + .Query [source, cypher, role=test-skip] ---- diff --git a/modules/ROOT/pages/functions/graph.adoc b/modules/ROOT/pages/functions/graph.adoc index 47a701d79..c271d6c66 100644 --- a/modules/ROOT/pages/functions/graph.adoc +++ b/modules/ROOT/pages/functions/graph.adoc @@ -201,6 +201,7 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA | `graph.byElementId()` is only supported in the xref:clauses/use.adoc[`USE`] clause. | As of Neo4j 5.26, `graph.byElementId()` is supported on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. On earlier versions, it is only supported on composite databases. +| A `USE` clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id. |=== .+graph.byElementId()+ From 8c0adfc2eb83591cecbc1d2d73d52d95e27eff97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:15:12 +0100 Subject: [PATCH 4/4] post-review corrections --- modules/ROOT/pages/clauses/use.adoc | 2 +- modules/ROOT/pages/functions/graph.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/clauses/use.adoc b/modules/ROOT/pages/clauses/use.adoc index 70c4f87d3..1d5643469 100644 --- a/modules/ROOT/pages/clauses/use.adoc +++ b/modules/ROOT/pages/clauses/use.adoc @@ -122,7 +122,7 @@ The xref:functions/graph.adoc#functions-graph-by-elementid[`graph.byElementId()` As of Neo4j 5.26, it is supported on both standard and composite databases (on previous versions it is only available on composite databases). [NOTE] -A USE clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id. +On a standard database, a `USE` clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id. In the below example, it is assumed that the DBMS contains the database corresponding to the given element id. If you are connected to a composite database it needs to be a element id to a constituent database, which is a standard database in the DBMS. diff --git a/modules/ROOT/pages/functions/graph.adoc b/modules/ROOT/pages/functions/graph.adoc index c271d6c66..839231680 100644 --- a/modules/ROOT/pages/functions/graph.adoc +++ b/modules/ROOT/pages/functions/graph.adoc @@ -201,7 +201,7 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA | `graph.byElementId()` is only supported in the xref:clauses/use.adoc[`USE`] clause. | As of Neo4j 5.26, `graph.byElementId()` is supported on both link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[standard and composite databases]. On earlier versions, it is only supported on composite databases. -| A `USE` clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id. +| On a standard database, a `USE` clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id. |=== .+graph.byElementId()+