Skip to main content

Home > git-documentdb > Collection > getFatDocHistory

Collection.getFatDocHistory() method#

Get revision history of a FatDoc data

Signature:
getFatDocHistory(shortName: string, historyOptions?: HistoryOptions, getOptions?: GetOptions): Promise<(FatDoc | undefined)[]>;

Parameters#

ParameterTypeDescription
shortNamestringshortName is a file path whose collectionPath is omitted.
historyOptionsHistoryOptions
getOptionsGetOptions
Returns:

Promise<(FatDoc | undefined)[]>

Array of FatDoc or undefined. - undefined if a specified data does not exist or it is deleted.

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

  • Array of FatBinaryDoc if described in .gitattribtues, otherwise array of FatTextDoc.

  • getOptions.forceDocType always overwrite return type.

Remarks#

See GitDocumentDB.getHistory() for detailed examples.

Exceptions#

Err.DatabaseClosingError

Err.InvalidJsonObjectError