Home > git-documentdb > Collection > update
#
Collection.update() methodUpdate a JSON document
Signature:#
ParametersParameter | Type | Description |
---|---|---|
_id | string | undefined | null | |
jsonDoc | JsonDoc | |
options | PutOptions |
Promise<PutResultJsonDoc >
#
RemarksThrows DocumentNotFoundError if a specified data does not exist. It might be better to use put() instead of update().
The saved file path is
${GitDocumentDB#workingDir}/${Collection#collectionPath}/${shortId}${extension}
.An update operation is not skipped even if no change occurred on a specified data.
#
Exceptions# Errors from validateDocument, validateId
# Errors from putWorker