组合查询更新nGQL

  • Nebula 版本:v.1.0

请教一下组合查询方法。
想把符合条件的节点进行更新
lookup on ve where ve.id==‘2677094’ YIELD ve.id AS id | update VERTEX $-.id SET ve.name = “Tim2”

报错

[ERROR (-7)]: SyntaxError: syntax error near `update’

这个要怎么改呢。

谢谢

目前不支持

2 个赞

只支持单个点的条件update

(czp@nebula) [test]> fetch prop on player 1
=======================================
| VertexID | player.name | player.age |
=======================================
| 1        | 1           | 1          |
---------------------------------------
Got 1 rows (Time spent: 3.107/5.355 ms)

Thu Mar 11 03:41:19 2021

(czp@nebula) [test]> update vertex 1 set player.age=2 when $^.player.age==1
Empty set (Time spent: 7.017/9.026 ms)

Thu Mar 11 03:41:25 2021

(czp@nebula) [test]> fetch prop on player 1
=======================================
| VertexID | player.name | player.age |
=======================================
| 1        | 1           | 2          |
---------------------------------------
Got 1 rows (Time spent: 1.602/3.443 ms)

Thu Mar 11 03:41:27 2021

请问1.0版本支不支持update set某个属性=null呢。
update vertex 2 set ve.id =NULL;

console报错
SyntaxError: syntax error near `NULL’

1.0完全不支持NULL

未来我们会支持组合查询的,有进一步的开发进展我会同步在这里哈