Class SQLiteCloudConnectionAbstract

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

Constructors

Properties

Configuration passed by client or extracted from connection string

operations: OperationsQueue = ...

Operations are serialized by waiting an any pending promises

Accessors

Methods

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

    Parameters

    Returns this

  • Will log to console if verbose mode is enabled

    Parameters

    • message: string
    • Rest...optionalParams: any[]

    Returns void

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

    Parameters

    Returns this

  • Sql is a promise based API for executing SQL statements. You can pass a simple string with a SQL statement or a template string using backticks and parameters in ${parameter} format. These parameters will be properly escaped and quoted like when using a prepared statement.

    Parameters

    • sql: string | TemplateStringsArray

      A sql string or a template string in backticks format

    • Rest...values: any[]

    Returns Promise<any>

    An array of rows in case of selections or an object with metadata in case of insert, update, delete.