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

Add possibility to reference original document in single document update statements #1792

Closed
dothebart opened this issue Mar 29, 2016 · 1 comment
Labels
1 Feature 2 Solved Resolution 3 AQL Query language related 3 Core

Comments

@dothebart
Copy link
Contributor

UPDATE has the possibility to directly work with a single document:

'UPDATE "dave" WITH { friends: []) } IN persons'

However, while one may use the variable emitted by a surrounding for loop:

FOR user IN users
  FILTER user._key == "7"
  UPDATE user WITH { friends: PUSH(user.friends, "8") } IN users

OLD may only be used in the RETURN statement:

'UPDATE "dave" WITH { friends: PUSH(DOCUMENT("persons/dave").friends, 8) } IN persons'

should be expressable like this:

'UPDATE "dave" WITH { friends: PUSH(OLD.friends, 8) } IN persons'
@dothebart dothebart added 1 Feature 3 AQL Query language related 3 Core labels Mar 29, 2016
@dothebart
Copy link
Contributor Author

@dothebart dothebart added the 2 Solved Resolution label Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Feature 2 Solved Resolution 3 AQL Query language related 3 Core
Projects
None yet
Development

No branches or pull requests

1 participant