OrientDB查询可在Studio上使用,但不能在PyOrient中使用

问题描述 投票:0回答:1

这在OrientDB Studio上有效(eset是EmbeddedSet):

UPDATE #37:0 SET eset = eset || ["foo", "bar"];

但是当我使用PyOrient时不行:

command = 'UPDATE #37:0 SET eset = eset || ["foo", "bar"];'
client.command(command)

>>> pyorient.exceptions.PyOrientSQLParsingException: com.orientechnologies.orient.core.sql.OCommandSQLParsingException - Error on parsing command: Invalid keyword ||.

显然,在Java中也会发生:https://community.orientdb.org/t/linkset-manipulation/171

有什么方法可以重写该查询以摆脱||部分?我无法制作documentation的首尾。

orientdb pyorient
1个回答
0
投票

PyOrient仍使用旧版SQL执行程序,该执行程序不支持||运算符。我建议使用以下内容(不完全等效,但应该可以)

UPDATE #37:0 ADD eset = ["foo", "bar"];
© www.soinside.com 2019 - 2024. All rights reserved.