4

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?

stj
  • 9,037
  • 19
  • 33
Deepak Agarwal
  • 907
  • 6
  • 21

1 Answers1

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