Skip to content

Commit e2a3f03

Browse files
update
1 parent 4d4991f commit e2a3f03

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

modules/ROOT/pages/clauses/use.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ MATCH (n) RETURN n
9393
[[query-use-examples-query-composite-database-constituent-graph-dynamically]]
9494
=== Query a composite database constituent graph dynamically
9595

96-
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.
96+
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.
9797

9898
This example uses a composite database named `myComposite` that includes an alias named `myConstituent`:
9999

@@ -114,12 +114,18 @@ USE graph.byName($graphName)
114114
MATCH (n) RETURN n
115115
----
116116

117+
[role=label--new-5.13]
117118
[[query-use-examples-query-composite-database-by-element-id]]
118119
=== Query a composite database constituent using elementId
119120

120-
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.
121-
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`.
122-
If the constituent database is not a standard database in the DBMS an error will be thrown:
121+
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.
122+
As of Neo4j 5.26, it is supported on both standard and composite databases (on previous versions it is only available on composite databases).
123+
124+
[NOTE]
125+
A USE clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id.
126+
127+
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.
128+
123129
.Query
124130
[source, cypher, role=test-skip]
125131
----

modules/ROOT/pages/functions/graph.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ For more information, see xref:subqueries/call-subquery.adoc#import-variables[CA
201201
| `graph.byElementId()` is only supported in the xref:clauses/use.adoc[`USE`] clause.
202202
| 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].
203203
On earlier versions, it is only supported on composite databases.
204+
| A `USE` clause with `graph.byElementId()` cannot be combined with other `USE` clauses unless the subsequent `USE` clauses reference the same element id.
204205
|===
205206

206207
.+graph.byElementId()+

0 commit comments

Comments
 (0)