Function: createLabel()

createLabel(args: { id?: LixGenerated<string>; lix: Pick<Lix, "db" | "sqlite" | "hooks">; lixcol_version_id?: string; name: string; }): Promise<{ id: LixGenerated<string>; name: string; }>

Creates a label that can be attached to change sets.

Labels help categorise change sets, for example "checkpoint" or "reviewed". They are simple name identifiers stored per version.

Example

const label = await createLabel({ lix, name: "checkpoint" })

Parameters

ParameterType
args{ id?: LixGenerated<string>; lix: Pick<Lix, "db" | "sqlite" | "hooks">; lixcol_version_id?: string; name: string; }
args.id?LixGenerated<string>
args.lixPick<Lix, "db" | "sqlite" | "hooks">
args.lixcol_version_id?string
args.namestring

Returns

Promise<{ id: LixGenerated<string>; name: string; }>