Oihana PHP Arango

OnDuplicate uses ConstantsTrait

Strategies accepted by the `onDuplicate` query parameter of the ArangoDB bulk import endpoint (`POST /_api/import?collection={name}`).

The value tells the server how to handle a row whose _key collides with an existing document:

  • ERROR — refuse the row and report it in the errors count (default behaviour).
  • UPDATE — patch the existing document with the supplied fields.
  • REPLACE — overwrite the existing document with the supplied payload (PUT semantics — fields absent from the row are dropped).
  • IGNORE — silently skip the row and bump the ignored count.
Tags
see
https://docs.arangodb.com/stable/develop/http-api/documents/#create-multiple-documents
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Constants

ERROR  : string = 'error'
Refuse the duplicate row and bump the `errors` count.
IGNORE  : string = 'ignore'
Silently skip the duplicate row and bump the `ignored` count.
REPLACE  : string = 'replace'
Overwrite the existing document with the supplied payload.
UPDATE  : string = 'update'
Patch the existing document with the supplied fields.

Constants

ERROR

Refuse the duplicate row and bump the `errors` count.

public string ERROR = 'error'

IGNORE

Silently skip the duplicate row and bump the `ignored` count.

public string IGNORE = 'ignore'

REPLACE

Overwrite the existing document with the supplied payload.

public string REPLACE = 'replace'

UPDATE

Patch the existing document with the supplied fields.

public string UPDATE = 'update'
On this page

Search results