DELETE EDGEGraph
DELETE EDGE
语句可以删除边。一次可以删除一条或多条边。用户可以结合管道符一起使用,详情请参见Graph。
如果需要删除一个点的所有出边,请删除这个点。详情请参见 Graph。
语法Graph
DELETE EDGE <edge_type> <src_vid> -> <dst_vid>[@<rank>] [, <src_vid> -> <dst_vid>[@<rank>] ...]
Caution
如果不指定 rank,则仅仅删除 rank 为 0 的边。需要删除所有的 rank,见如下示例。
示例Graph
nebula> DELETE EDGE serve "player100" -> "team204"@0;
# 结合管道符,删除两点之间同类型的所有rank的边。
nebula> GO FROM "player100" OVER follow \
WHERE dst(edge) == "team204" \
YIELD src(edge) AS src, dst(edge) AS dst, rank(edge) AS rank \
| DELETE EDGE follow $-.src -> $-.dst @ $-.rank;
最后更新:
January 18, 2022