Skip to main content

Home > git-documentdb > GitDocumentDB > delete

GitDocumentDB.delete() method#

Delete a document by _id property in JsonDoc

Signature:
delete(jsonDoc: JsonDoc, options?: DeleteOptions): Promise<DeleteResultJsonDoc>;

Parameters#

ParameterTypeDescription
jsonDocJsonDocOnly the _id property of the JsonDoc is referenced. _id is a file path whose extension is omitted.
optionsDeleteOptions
Returns:

Promise<DeleteResultJsonDoc >

Remarks#

  • This is an alias of GitDocumentDB#rootCollection.delete()

Exceptions#

Err.UndefinedDocumentIdError

Err.DatabaseClosingError

Err.TaskCancelError

# Errors from deleteWorker