Home > git-documentdb > Collection > getHistory
#
Collection.getHistory() methodGet revision history of a JSON document
Signature:#
ParametersParameter | Type | Description |
---|---|---|
_id | string | |
historyOptions | HistoryOptions | The array of revisions is filtered by HistoryOptions.filter. |
Promise<(JsonDoc | undefined)[]>
Array of JsonDoc or undefined if a specified document does not exist or it is deleted.
#
RemarksBy default, revisions are sorted by reverse chronological order. However, keep in mind that Git dates may not be consistent across repositories.
If serializeFormat is front-matter, this function can't work for .yml files. Use getFatDocHistory() instead. e.g.) foo.yml