Skip to main content

Home > git-documentdb > GitDocumentDB > getFatDoc

GitDocumentDB.getFatDoc() method#

Get a FatDoc data

Signature:
getFatDoc(name: string, getOptions?: GetOptions): Promise<FatDoc | undefined>;

Parameters#

ParameterTypeDescription
namestringname is a file path.
getOptionsGetOptions
Returns:

Promise<FatDoc | undefined>

  • undefined if a specified data does not exist.

  • FatJsonDoc if the file extension is SerializeFormat.extension. Be careful that JsonDoc may not have _id property when an app other than GitDocumentDB creates it.

  • FatBinaryDoc if described in .gitattribtues, otherwise FatTextDoc.

  • getOptions.forceDocType always overwrite return type.

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

Exceptions#

Err.DatabaseClosingError

Err.InvalidJsonObjectError