如何删除AgensGraph上的节点?

我尝试删除agens图上的节点并失败 .

lee=# match (n:v{id:1}) delete n;
ERROR:  vertex 4 in "v" has edge(s)

如何删除节点?

回答(1)

2 years ago

在删除令牌之前添加分离 .

assam=# match (n:v{id:1}) detach delete n;
GRAPH WRITE (DELETE VERTEX 1, DELETE EDGE 1)