I am using AQL to update records in a collection. Sometimes, I get [ArangoError 1200: conflict]. In JS Shell I can set the 3rd parameter as true to use overwrite and ignore the conflict. How do I ignore conflict in AQL?
Asked
Active
Viewed 1,357 times
4
-
Can you supply an example query that produces a conflict? – stj Dec 16 '15 at 10:25
-
Did the the answer suit your needs? If yes, can you mark it solved? If not, whats missing? – dothebart Jan 13 '16 at 14:20
1 Answers
5
Though I am not sure what causes the conflict, many query errors can be turned off by appending the directive OPTIONS { ignoreErrors: true }
to the UPDATE
part of the query.
For example, the following original query
FOR doc IN collection
FILTER doc.value == 'someValue'
UPDATE doc WITH { count : doc.count + 1 } IN collection
would be adjusted to
FOR doc IN collection
FILTER doc.value == 'someValue'
UPDATE doc WITH { count : doc.count + 1 } IN collection OPTION { ignoreErrors: true }
Though suppressing errors may hide relevant issues that exist in a query, so I wouldn't recommend it in general.

stj
- 9,037
- 19
- 33