简体   繁体   中英

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.

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)

Arangodb version 2.5.5

In 2.5 you need to assign NEW to a temporary variable, eg

UPDATE ... LET x = NEW RETURN x

The simplified syntax is only available in 2.6.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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