Function: createCheckpoint()

createCheckpoint(args: { lix: Lix; }): Promise<LixSelectable<EntityStateView<{ author_account_ids?: null | string[]; change_ids?: null | string[]; change_set_id: string; id: string; meta_change_ids?: null | string[]; parent_commit_ids?: null | string[]; }>>>

Converts the current working change set into a checkpoint.

The working change set becomes immutable and receives the checkpoint label. A fresh empty working change set is created so that new changes can continue to accumulate. Cache tables are updated and a state_commit hook fires for observers.

Example

const { id } = await createCheckpoint({ lix })

Parameters

ParameterTypeDescription
args{ lix: Lix; }-
args.lixLixActive Lix instance executing the operation.

Returns

Promise<LixSelectable<EntityStateView<{ author_account_ids?: null | string[]; change_ids?: null | string[]; change_set_id: string; id: string; meta_change_ids?: null | string[]; parent_commit_ids?: null | string[]; }>>>