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
;labels?
:Pick
<{id
:LixGenerated
<string
>;name
:string
; },"id"
>[];lix
:Pick
<Lix
,"db"
|"sqlite"
|"hooks"
>;lixcol_version_id?
:string
; }):Promise
<{id
:LixGenerated
<string
>;metadata?
:null
|Record
<string
,any
>; } & {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.
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 ; labels? : Pick <{ id : LixGenerated <string >; name : string ; }, "id" >[]; lix : Pick <Lix , "db" | "sqlite" | "hooks" >; 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.labels? | Pick <{ id : LixGenerated <string >; name : string ; }, "id" >[] | - |
args.lix | Pick <Lix , "db" | "sqlite" | "hooks" > | - |
args.lixcol_version_id? | string | Version ID where the change set should be stored. Defaults to active version |
Promise
<{ id
: LixGenerated
<string
>; metadata?
: null
| Record
<string
, any
>; } & { lixcol_version_id
: string
; }>