这在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的首尾。
PyOrient仍使用旧版SQL执行程序,该执行程序不支持||
运算符。我建议使用以下内容(不完全等效,但应该可以)
UPDATE #37:0 ADD eset = ["foo", "bar"];