Skip to content

getVersion

getVersion<DataModel>(props): Promise<VexVersion | null>

Defined in: packages/core/src/versions/model.ts:130

Returns one specific version row by its document and version number.

DataModel extends GenericDataModel

Input props.

string

The collection slug.

GenericQueryCtx<DataModel> | GenericMutationCtx<DataModel>

A Convex query or mutation context.

string

The document’s _id, stringified.

number

The version number to fetch.

Promise<VexVersion | null>

The matching row, or null when no such version exists (an invalid/out-of-range number, or a version deleteVersion already removed).