Skip to content

Commit 6941459

Browse files
committed
clear internal mappings upon deletion
1 parent e7bc30a commit 6941459

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

graph.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ func (g *Graph) ExecutionPlan(q string) (string, error) {
7575
// Delete removes the graph.
7676
func (g *Graph) Delete() error {
7777
_, err := g.Conn.Do("GRAPH.DELETE", g.Id)
78+
79+
// clear internal mappings
80+
g.labels = g.labels[:0]
81+
g.properties = g.properties[:0]
82+
g.relationshipTypes = g.relationshipTypes[:0]
83+
7884
return err
7985
}
8086

0 commit comments

Comments
 (0)