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
| Name | Type |
|---|---|
config | string | SQLiteCloudConfig |
callback? | ErrorCallback |
Returns
Defined in
Properties
config
• Protected config: SQLiteCloudConfig
Configuration passed by client or extracted from connection string
Defined in
operations
• Protected operations: OperationsQueue
Operations are serialized by waiting an any pending promises
Defined in
Accessors
connected
• get connected(): boolean
Returns true if connection is open
Returns
boolean
Defined in
Methods
close
▸ close(): SQLiteCloudConnection
Disconnect from server, release transport.
Returns
Defined in
connect
▸ connect(callback?): SQLiteCloudConnection
Connect will establish a tls or websocket transport to the server based on configuration and environment
Parameters
| Name | Type |
|---|---|
callback? | ErrorCallback |
Returns
Defined in
connectTransport
▸ connectTransport(config, callback?): SQLiteCloudConnection
Parameters
| Name | Type |
|---|---|
config | SQLiteCloudConfig |
callback? | ErrorCallback |
Returns
Defined in
log
▸ log(message, ...optionalParams): void
Will log to console if verbose mode is enabled
Parameters
| Name | Type |
|---|---|
message | string |
...optionalParams | any[] |
Returns
void
Defined in
sendCommands
▸ sendCommands(commands, callback?): SQLiteCloudConnection
Will enquee a command to be executed and callback with the resulting rowset/result/error
Parameters
| Name | Type |
|---|---|
commands | string |
callback? | ResultsCallback<any> |
Returns
Defined in
transportCommands
▸ transportCommands(commands, callback?): SQLiteCloudConnection
Send a command, return the rowset/result or throw an error
Parameters
| Name | Type |
|---|---|
commands | string |
callback? | ResultsCallback<any> |
Returns
Defined in
verbose
▸ verbose(): void
Enable verbose logging for debug purposes
Returns
void