我有一个顶点,它具有来自两个标记的属性:
> match (x:t1) where id(x) == '2' return x
+--------------------------------------+
| x |
+--------------------------------------+
| ("2" :t3{age: 20} :t1{name: "John"}) |
+--------------------------------------+
Got 1 rows (time spent 4141/99503 us)
如果我只是将t3
属性设置为null
,它们仍然挂在那里作为null
s:
> update vertex '2' set t3.age = null
Execution succeeded (time spent 3938/121345 us)
> match (x:t1) where id(x) == '2' return x
+--------------------------------------------+
| x |
+--------------------------------------------+
| ("2" :t3{age: __NULL__} :t1{name: "John"}) |
+--------------------------------------------+
Got 1 rows (time spent 4054/199559 us)
如何将标记从该顶点完全分离?
更新2022-Dec-05:自3.3.0 以来的新更新
- 在3.3.0之后,裸顶点(无标记(默认关闭(您可以通过配置启用它(,因此,它的行为与2.6中的默认行为相同
2022-Jan-22更新:现在支持
- 在2.6中,从VID中删除标记(只有一个标记(也会删除顶点
- 而在3.0之后,裸顶点(无标签(是允许的,因此删除标签将不再删除顶点
DELETE TAG <tag_name_list> FROM <VID>;
参考:
- https://docs.nebula-graph.io/2.6.1/3.ngql-guide/10.tag-statements/6.delete-tag/
- https://docs.nebula-graph.io/master/3.ngql-guide/10.tag-statements/6.delete-tag/
感谢您对星云图的探索;(。
正如我所知,目前还没有detach tag
,现在的缓解措施只是删除顶点,并用相同的vid插入它,只有一个标签:t1。
这里提出了一个问题。
BR//Wey