Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何批量修改某一种类型的边的属性值 #5934

Open
qhykwsw opened this issue Aug 27, 2024 · 0 comments
Open

如何批量修改某一种类型的边的属性值 #5934

qhykwsw opened this issue Aug 27, 2024 · 0 comments

Comments

@qhykwsw
Copy link

qhykwsw commented Aug 27, 2024

我想实现的功能是将所有边的relation_value值减100(不足100的减到0),并把last_damping_time设置为当前时间。

我尝试了以下query
query = """
MATCH ()-[e:PlayerRelation]->()
SET e.relation_value = CASE WHEN e.relation_value > 100 THEN e.relation_value - 100 ELSE 0 END,
e.last_damping_time = now()
"""

但是出现了语法错误:SyntaxError: syntax error near ` MA'

我通过google和ChatGPT进行了搜索,也没有获得解决方案,我很奇怪是哪里出现了问题,nGQL是不支持批量修改边的属性么,有没有其他方法能做到。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant