Skip to main content

GRAPH.COPY

Usage: GRAPH.COPY <src> <dest>

The GRAPH.COPY command creates a copy of a graph, while the copy is performed the src graph is fully accessible.

Example:

# Graphs list is empty
graph_list = db.list()

# Create Graph 'A'
graph_a = db.select_graph('A')
result = graph_a.query('CREATE (:Account {number: 516637})')

# Copy Graph 'A' to 'Z'
graph_z = graph_a.copy('Z')

# Graphs list including 'A' and 'Z'
graph_list = db.list()

# Query Graph 'Z'
result = graph_z.query('MATCH (a:Account) RETURN a.number')Query Graph 'Z'