简体   繁体   English

RETURN NEW不适用于arangodb中的UPDATE

[英]RETURN NEW is not working with UPDATE in arangodb

I am trying to get all the documents updates in the aql but it doesn't seem to be working. 我正在尝试在aql中获取所有文档更新,但似乎无法正常工作。

test -> {value:0}

FOR record in test
    UPDATE record with {value:1} in test 
      RETURN NEW

I get [1501] syntax error, unexpected RETURN declaration near 'RETURN NEW' at position 3:5 (while parsing) 我收到[1501] syntax error, unexpected RETURN declaration near 'RETURN NEW' at position 3:5 (while parsing)

Arangodb version 2.5.5 Arangodb版本2.5.5

In 2.5 you need to assign NEW to a temporary variable, eg 在2.5中,您需要将NEW赋给一个临时变量,例如

UPDATE ... LET x = NEW RETURN x

The simplified syntax is only available in 2.6. 简化的语法仅在2.6中可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM