createChangeSet(
args: {elements?:Omit<NewState<{change_id:string;change_set_id:string;entity_id:string;file_id:string;schema_key:string; }>,"change_set_id">[];id?:string;lix:Lix;lixcol_version_id?:string; }):Promise<{id:LixGenerated<string>; } & {lixcol_version_id:string; }>
Creates a change set and optionally attaches elements and labels.
Change sets are the building blocks of versions and checkpoints. This function inserts all provided relations in a single transaction and returns the newly created record.
const cs = await createChangeSet({ lix, elements: [{ change_id, entity_id }] })| Parameter | Type | Description |
|---|---|---|
args | { elements?: Omit<NewState<{ change_id: string; change_set_id: string; entity_id: string; file_id: string; schema_key: string; }>, "change_set_id">[]; id?: string; lix: Lix; lixcol_version_id?: string; } | - |
args.elements? | Omit<NewState<{ change_id: string; change_set_id: string; entity_id: string; file_id: string; schema_key: string; }>, "change_set_id">[] | - |
args.id? | string | - |
args.lix | Lix | - |
args.lixcol_version_id? | string | Version ID where the change set should be stored. Defaults to active version |
Promise<{ id: LixGenerated<string>; } & { lixcol_version_id: string; }>