Home > git-documentdb > GitDocumentDB > getHistory
#
GitDocumentDB.getHistory() methodGet revision history of a document
Signature:#
ParametersParameter | Type | Description |
---|---|---|
_id | string | _id is a file path whose extension is omitted. |
historyOptions | HistoryOptions | The array of revisions is filtered by HistoryOptions.filter. |
Promise<(JsonDoc | undefined)[]>
Array of FatDoc or undefined. - undefined if a specified document does not exist or it is deleted.
JsonDoc if isJsonDocCollection is true or the file extension is SerializeFormat.extension.
Uint8Array or string if isJsonDocCollection is false.
getOptions.forceDocType always overwrite return type.
#
RemarksBy default, revisions are sorted by reverse chronological order. However, keep in mind that Git dates may not be consistent across repositories.
This is an alias of GitDocumentDB.rootCollection.getHistory().