Skip to main content

Home > git-documentdb > GitDocumentDB > destroy

GitDocumentDB.destroy() method#

Destroy a database

Signature:
destroy(options?: DatabaseCloseOption): Promise<{
ok: true;
}>;

Parameters#

ParameterTypeDescription
optionsDatabaseCloseOptionThe options specify how to close database.
Returns:

Promise<{ ok: true; }>

Remarks#

  • GitDocumentDB.close() is called automatically before destroying.

  • Default value of options.force is true.

  • destroy() removes the Git repository and the working directory from the filesystem.

  • destroy() does not remove localDir (which is specified in constructor).

Exceptions#

Err.DatabaseClosingError

Err.DatabaseCloseTimeoutError

Err.FileRemoveTimeoutError