public function update(Document $document, array $options = [])
    {
        return $this->updateById($document->getCollectionId(), $this->getDocumentId($document), $document, $options);
    }
public function update(Document $document, array $options = [])
    {
        return $this->updateById($document->getCollectionId(), $this->getDocumentId($document), $document, $options);
    }
public function update ( Document $ document , array $ options = [ ] ) { return $ this -> updateById ( $ document -> getCollectionId ( ) , $ this -> getDocumentId ( $ document ) , $ document , $ options ) ; }
Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.
Attention - The behavior of this method has changed since version 1.1

This will update the document on the server

This will throw if the document cannot be updated

If policy is set to error (locally or globally through the ConnectionOptions)
and the passed document has a _rev value set, the database will check
that the revision of the document to-be-replaced is the same as the one given.

@throws Exception

@param Document $document - The patch document that will update the document in question
@param array    $options  - optional, array of options
<p>Options are :
<li>'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])</li>
<li>'keepNull' - can be used to instruct ArangoDB to delete existing attributes instead setting their values to null. Defaults to true (keep attributes when set to null)</li>
<li>'waitForSync' - can be used to force synchronisation of the document update operation to disk even in case that the waitForSync flag had been disabled for the entire collection</li>
</p>

@return bool - always true, will throw if there is an error
Update an existing document in a collection identified by the including _id and optionally _rev in the patch document . Attention - The behavior of this method has changed since version 1 . 1