File tree Expand file tree Collapse file tree 1 file changed +26
-6
lines changed Expand file tree Collapse file tree 1 file changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ parent: "Commands"
9
9
10
10
Usage: ` GRAPH.COPY <src> <dest> `
11
11
12
- The ` GRAPH.COPY ` command creates a copy of a graph, while the copy is performed
13
- the ` src ` graph is fully accessible.
12
+ The GRAPH.COPY command creates a copy of a graph while leaving the source graph fully accessible.
14
13
15
14
Example:
16
- ```
17
- 127.0.0.1:6379> keys *
15
+
16
+ {% capture shell_0 %}
17
+ 127.0.0.1:6379> GRAPH.LIST
18
18
(empty array)
19
19
127.0.0.1:6379> GRAPH.QUERY A "CREATE (: Account {number: 516637})"
20
20
1 ) 1 ) "Labels added: 1"
@@ -24,7 +24,7 @@ Example:
24
24
5 ) "Query internal execution time: 0.588084 milliseconds"
25
25
127.0.0.1:6379> GRAPH.COPY A Z
26
26
"OK"
27
- 127.0.0.1:6379> keys *
27
+ 127.0.0.1:6379> GRAPH.LIST
28
28
1 ) "Z"
29
29
2 ) "telemetry{A}"
30
30
3 ) "A"
@@ -33,4 +33,24 @@ Example:
33
33
2 ) 1 ) 1 ) (integer) 516637
34
34
3 ) 1 ) "Cached execution: 0"
35
35
2 ) "Query internal execution time: 0.638375 milliseconds"
36
- ```
36
+ {% endcapture %}
37
+
38
+ {% capture python_0 %}
39
+ # Graphs list is empty
40
+ graph_list = db.list()
41
+
42
+ # Create Graph 'A'
43
+ graph_a = db.select_graph('A')
44
+ result = graph_a.query('CREATE (: Account {number: 516637})')
45
+
46
+ # Copy Graph 'A' to 'Z'
47
+ graph_z = graph_a.copy('Z')
48
+
49
+ # Graphs list including 'A' and 'Z'
50
+ graph_list = db.list()
51
+
52
+ # Query Graph 'Z'
53
+ result = graph_z.query('MATCH (a: Account ) RETURN a.number')
54
+ {% endcapture %}
55
+
56
+ {% include code_tabs.html id="tabs_0" shell=shell_0 python=python_0 %}
You can’t perform that action at this time.
0 commit comments