Skip to content

sqlocal / index / SQLocalProcessor

Class: SQLocalProcessor

Defined in: src/processor.ts:37

The SQLocal client exchanges messages with a paired instance of SQLocalProcessor to interact with databases.

See

https://sqlocal.dev/guide/setup

Constructors

Constructor

ts
new SQLocalProcessor(driver): SQLocalProcessor;

Defined in: src/processor.ts:57

Parameters

ParameterType
driverSQLocalDriver

Returns

SQLocalProcessor

Properties

onmessage?

ts
optional onmessage?: (message, transfer) => void;

Defined in: src/processor.ts:55

After an InputMessage has been processed, the resulting OutputMessage is emitted to the function passed to onmessage.

Parameters

ParameterType
messageOutputMessage
transferTransferable[]

Returns

void

Methods

postMessage()

ts
postMessage(event, _transfer?): Promise<void>;

Defined in: src/processor.ts:141

To interact with a database, an InputMessage is passed to postMessage for processing.

Parameters

ParameterType
eventInputMessage | MessageEvent<InputMessage>
_transfer?Transferable

Returns

Promise<void>

Released under the MIT License