Skip to main content

Home > git-documentdb > Collection > getFatDoc

Collection.getFatDoc() method#

Get a FatDoc data

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

Parameters#

ParameterTypeDescription
shortNamestringshortName is a file path whose collectionPath is omitted.
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.

Exceptions#

Err.DatabaseClosingError

Err.InvalidJsonObjectError