You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/values-and-types/graph-references.adoc
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,17 @@ These include:
26
26
[[rules]]
27
27
== Rules
28
28
29
-
The following rules apply for graph references when using identifiers (static graph references, administration commands) or the `graph.byName` functions:
30
-
31
-
* Unquoted dots are separators between a composite database and its constituent.
32
-
For example, `composite.db1` represents the constituent `composite.db1` in the composite database `composite`.
33
-
To refer to a database with a dot (`.`) in its name, quote the graph reference instead: `++`composite.db1`++`.
34
-
* When resolving a graph reference within a graph function, the string argument is parsed like a static graph reference.
35
-
Thus, `USE graph.byName(<graph-reference>)` is typically equivalent to `USE <graph-reference>`.
36
-
However, escaping rules for xref::syntax/naming.adoc#symbolic-names-escaping-rules[symbolic names] are applied to the argument.
37
-
For `STRING` literals, both the xref:values-and-types/boolean-numeric-string.adoc#string-literal-escape-sequences[escaping rules] (during query parsing) and xref::syntax/naming.adoc#symbolic-names-escaping-rules[symbolic names] (during graph reference evaluation) are applied.
38
-
For example, the graph reference in `USE graph.byName('+composite.1\\u0041+')` resolves to the constituent `composite.1a` of the composite database `composite`.
29
+
The following rules apply for graph references when using identifiers (static graph references, administration commands) or the `graph.byName` functions.
30
+
31
+
`USE graph.byName(<graph-reference>)` is typically equivalent to `USE <graph-reference>`. There may be differences if the name contains special characters:
32
+
33
+
* Graph references passed as identifiers such as `USE <graph-reference>` apply the escaping rules of xref::syntax/naming.adoc#symbolic-names-escaping-rules[symbolic names]. Graph names can either be unquoted or need to be quoted in its entirety, e.g. `USE neo4j` or `USE `db-with-dash``.
34
+
35
+
* Graph references passed as graph functions such as `USE graph.byName(<graph-reference>)` apply the escaping rules of xref:values-and-types/boolean-numeric-string.adoc#string-literal-escape-sequences[string literals]. Note that quotes are considered as part of the name, e.g. `USE graph.byName('`db-with-dash`') would try to resolve the graph reference ``db-with-dash``.
36
+
37
+
38
+
For example, the graph reference `db-with-dash` can be passed as:
39
+
40
+
* `USE `db-with-dash``
41
+
* `USE graph.byName('db-with-dash')`
42
+
* `USE graph.byName($param)` with parameter `db-with-dash`
0 commit comments