interface

VersionTransaction

Same-transaction snapshot persistence and access-filtered history reads.

Properties

PropertyTypeDescription
SaveVersionfunc(context.Context, schema.Collection, Document, int) (Version, error)The SaveVersion value.
ListVersionsfunc(context.Context, VersionRequest) ([]Version, error)The ListVersions value.
CountVersionsfunc(context.Context, VersionRequest) (int, error)CountVersions counts retained snapshots with the same access and locale predicates as ListVersions, without reading snapshot values into the result.
FindVersionfunc(context.Context, schema.Collection, string, int) (Version, error)The FindVersion value.

Full signature

type VersionTransaction interface { SaveVersion(context.Context, schema.Collection, Document, int) (Version, error) ListVersions(context.Context, VersionRequest) ([]Version, error) // CountVersions counts retained snapshots with the same access and locale // predicates as ListVersions, without reading snapshot values into the result. CountVersions(context.Context, VersionRequest) (int, error) FindVersion(context.Context, schema.Collection, string, int) (Version, error) }

Source store/store.go:253