Modules
Table of contents
Classes
Interfaces
Type Aliases
Functions
Type Aliases
ErrorCallback
Ƭ ErrorCallback: (error: Error | null) => void
Type declaration
▸ (error): void
Parameters
| Name | Type |
|---|---|
error | Error | null |
Returns
void
Defined in
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
| Name | Type |
|---|---|
param | SQLiteCloudDataTypes |
Returns
string
Defined in
parseConnectionString
▸ parseConnectionString(connectionString): SQLiteCloudConfig
Parse connectionString like sqlitecloud://username:password@host:port/database?option1=xxx&option2=xxx into its components
Parameters
| Name | Type |
|---|---|
connectionString | string |
Returns
Defined in
prepareSql
▸ prepareSql(sql, ...params): string
Take a sql statement and replaces ? or $named parameters that are properly serialized and escaped.
Parameters
| Name | Type |
|---|---|
sql | string |
...params | (SQLiteCloudDataTypes | SQLiteCloudDataTypes[])[] |
Returns
string
Defined in
validateConfiguration
▸ validateConfiguration(config): SQLiteCloudConfig
Validate configuration, apply defaults, throw if something is missing or misconfigured
Parameters
| Name | Type |
|---|---|
config | SQLiteCloudConfig |