aqlUpdate.php
Table of Contents
Functions
- aqlUpdate() : string
- Partially modifies a document with the given attributes, by adding new and updating existing attributes.
Functions
aqlUpdate()
Partially modifies a document with the given attributes, by adding new and updating existing attributes.
aqlUpdate([ReplaceOptions|null, with?: string|null} $init = [] ][, string $operation = Operation::UPDATE ]) : string
Basic Syntax:*
UPDATE `document` IN `collection`
UPDATE `keyExpression` WITH `document` IN `collection`
Parameters
- $init : ReplaceOptions|null, with?: string|null} = []
-
Initial options for the UPDATE or REPLACE statement, with the keys:
- 'collection' : The collection in which the document is updated, written verbatim (default
@@collection). - 'doc' : The document expression to update (
UPDATE <doc> IN …), used when 'with' is absent (defaultdoc). - 'key' : The key expression that 'with' applies to (
UPDATE <key> WITH …), used with 'with' only (defaultdoc). - 'options' : The default 'options' expression definition
- 'with' : The document of attributes to apply to 'key' (
UPDATE <key> WITH <with> IN …). It is not the AQLWITHcollections clause.
'doc', 'key' and 'with' are written verbatim : build a document with aqlDocument(), which takes the 'rawKeys' / 'rawValues' / 'useSpace' options. This function reads none of them, and a PHP array passed here is not formatted.
- 'collection' : The collection in which the document is updated, written verbatim (default
- $operation : string = Operation::UPDATE
-
The AQL operation to perform. Must be either Operation::UPDATE (default) or Operation::REPLACE.
If the "REPLACE" operation is used, see the replace method.