Interface: LixEnvironment

Properties

PropertyTypeDescription
callCallInvoke an engine function inside the environment. Environments MUST implement this and route the call to the engine that booted next to SQLite, regardless of whether the engine runs on the main thread or inside a Worker. The SQL driver uses the "lix_exec_sync" route to execute compiled statements.
spawnActor?(opts: SpawnActorOptions) => Promise<EnvironmentActorHandle>-

Methods

close()

close(): Promise<void>

Returns

Promise<void>


create()

create(opts: { blob: ArrayBuffer; }): Promise<void>

Parameters

ParameterType
opts{ blob: ArrayBuffer; }
opts.blobArrayBuffer

Returns

Promise<void>


exists()

exists(): Promise<boolean>

Returns

Promise<boolean>


export()

export(): Promise<ArrayBuffer>

Returns

Promise<ArrayBuffer>


open()

open(opts: { boot: { args: BootArgs; }; emit: (ev: EngineEvent) => void; }): Promise<{ engine?: LixEngine; }>

Parameters

ParameterType
opts{ boot: { args: BootArgs; }; emit: (ev: EngineEvent) => void; }
opts.boot{ args: BootArgs; }
opts.boot.argsBootArgs
opts.emit(ev: EngineEvent) => void

Returns

Promise<{ engine?: LixEngine; }>