Modules

Table of contents

Classes

Interfaces

Type Aliases

Functions

Type Aliases

ErrorCallback

Ƭ ErrorCallback: (error: Error | null) => void

Type declaration

â–¸ (error): void

Parameters
NameType
errorError | null
Returns

void

Defined in

src/drivers/types.ts:120

Functions

escapeSqlParameter

â–¸ escapeSqlParameter(param): string

Takes a generic value and escapes it so it can replace ? as a binding in a prepared SQL statement

Parameters

NameType
paramSQLiteCloudDataTypes

Returns

string

Defined in

src/drivers/utilities.ts:70


parseConnectionString

â–¸ parseConnectionString(connectionString): SQLiteCloudConfig

Parse connectionString like sqlitecloud://username:password@host:port/database?option1=xxx&option2=xxx into its components

Parameters

NameType
connectionStringstring

Returns

SQLiteCloudConfig

Defined in

src/drivers/utilities.ts:210


prepareSql

â–¸ prepareSql(sql, ...params): string

Take a sql statement and replaces ? or $named parameters that are properly serialized and escaped.

Parameters

NameType
sqlstring
...params(SQLiteCloudDataTypes | SQLiteCloudDataTypes[])[]

Returns

string

Defined in

src/drivers/utilities.ts:105


validateConfiguration

â–¸ validateConfiguration(config): SQLiteCloudConfig

Validate configuration, apply defaults, throw if something is missing or misconfigured

Parameters

NameType
configSQLiteCloudConfig

Returns

SQLiteCloudConfig

Defined in

src/drivers/utilities.ts:173