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 name of the collection in which the document should be updated.
- 'doc' : An object and contain the attributes and values to update.
- 'options' : The default 'options' expression definition
- 'rawValues' : array, keys whose values should be treated as raw AQL expressions - used with the 'with' option)
- 'rawKeys' : array, keys which should be kept raw (their values are not wrapped or converted) - used with the 'with' option)
- 'useSpace' : bool, add spaces around braces and after commas
- 'with' : One or multiple collections for WITH clause -> WITH collection1 [, collection2 [, ... collectionN ] ]
- $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.