Skip to main content

Home > git-documentdb > GitDocumentDB > get

GitDocumentDB.get() method#

Get a JSON document

Signature:
get(_id: string): Promise<JsonDoc | undefined>;

Parameters#

ParameterTypeDescription
_idstring_id is a file path whose extension is omitted.
Returns:

Promise<JsonDoc | undefined>

  • undefined if a specified document does not exist.

  • JsonDoc may not have _id property when an app other than GitDocumentDB creates it.

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

Exceptions#

Err.DatabaseClosingError

Err.InvalidJsonObjectError