Home > git-documentdb > Collection > getOldRevision
#
Collection.getOldRevision() methodGet an old revision of a JSON document
Signature:#
ParametersParameter | Type | Description |
---|---|---|
shortId | string | shortId is a file path whose collectionPath and extension are omitted. |
revision | number | Specify a number to go back to old revision. Default is 0. See Collection.getHistory() for the array of revisions. |
historyOptions | HistoryOptions | The array of revisions is filtered by HistoryOptions.filter. |
Promise<JsonDoc | undefined>
#
Remarksundefined if a specified document does not exist or it is deleted.
If serializeFormat is front-matter, this function can't correctly distinguish files that has the same _id but different extension. Use getFatDocOldRevision() instead. e.g.) foo.md and foo.yml