SQLiteCloudConnection

Base class for SQLiteCloudConnection handles basics and defines methods. Actual connection management and communication with the server in concrete classes.

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new SQLiteCloudConnection(config, callback?): SQLiteCloudConnection

Parse and validate provided connectionString or configuration

Parameters

NameType
configstring | SQLiteCloudConfig
callback?ErrorCallback

Returns

SQLiteCloudConnection

Defined in

src/drivers/connection.ts:16

Properties

config

Protected config: SQLiteCloudConfig

Configuration passed by client or extracted from connection string

Defined in

src/drivers/connection.ts:28


operations

Protected operations: OperationsQueue

Operations are serialized by waiting an any pending promises

Defined in

src/drivers/connection.ts:31

Accessors

connected

get connected(): boolean

Returns true if connection is open

Returns

boolean

Defined in

src/drivers/connection.ts:74

Methods

close

close(): SQLiteCloudConnection

Disconnect from server, release transport.

Returns

SQLiteCloudConnection

Defined in

src/drivers/connection.ts:100


connect

connect(callback?): SQLiteCloudConnection

Connect will establish a tls or websocket transport to the server based on configuration and environment

Parameters

NameType
callback?ErrorCallback

Returns

SQLiteCloudConnection

Defined in

src/drivers/connection.ts:38


connectTransport

connectTransport(config, callback?): SQLiteCloudConnection

Parameters

NameType
configSQLiteCloudConfig
callback?ErrorCallback

Returns

SQLiteCloudConnection

Defined in

src/drivers/connection.ts:56


log

log(message, ...optionalParams): void

Will log to console if verbose mode is enabled

Parameters

NameType
messagestring
...optionalParamsany[]

Returns

void

Defined in

src/drivers/connection.ts:62


sendCommands

sendCommands(commands, callback?): SQLiteCloudConnection

Will enquee a command to be executed and callback with the resulting rowset/result/error

Parameters

NameType
commandsstring
callback?ResultsCallback<any>

Returns

SQLiteCloudConnection

Defined in

src/drivers/connection.ts:82


transportCommands

transportCommands(commands, callback?): SQLiteCloudConnection

Send a command, return the rowset/result or throw an error

Parameters

NameType
commandsstring
callback?ResultsCallback<any>

Returns

SQLiteCloudConnection

Defined in

src/drivers/connection.ts:59


verbose

verbose(): void

Enable verbose logging for debug purposes

Returns

void

Defined in

src/drivers/connection.ts:77