Interface SQLiteCloudConfig

Configuration for SQLite cloud connection

Options are all lowecase so they 1:1 compatible with C SDK

interface SQLiteCloudConfig {
    apikey?: string;
    clientid?: string;
    compression?: boolean;
    connectionstring?: string;
    create?: boolean;
    database?: string;
    gatewayurl?: string;
    host?: string;
    insecure?: boolean;
    maxdata?: number;
    maxrows?: number;
    maxrowset?: number;
    memory?: boolean;
    noblob?: boolean;
    non_linearizable?: boolean;
    password?: string;
    password_hashed?: boolean;
    port?: number;
    timeout?: number;
    tlsoptions?: ConnectionOptions;
    username?: string;
    usewebsocket?: boolean;
    verbose?: boolean;
    zerotext?: boolean;
}

Properties

apikey?: string

API key can be provided instead of username and password

clientid?: string

Optional identifier used for verbose logging

compression?: boolean
connectionstring?: string

Connection string in the form of sqlitecloud://user:password@host:port/database?options

create?: boolean

Create the database if it doesn't exist?

database?: string

Name of database to open

gatewayurl?: string

Url where we can connect to a SQLite Cloud Gateway that has a socket.io deamon waiting to connect, eg. wss://host:4000

host?: string

Host name is required unless connectionstring is provided, eg: xxx.sqlitecloud.io

insecure?: boolean

Connect using plain TCP port, without TLS encryption, NOT RECOMMENDED, TEST ONLY

maxdata?: number

Do not send columns with more than max_data bytes

maxrows?: number

Server should chunk responses with more than maxRows

maxrowset?: number

Server should limit total number of rows in a set to maxRowset

memory?: boolean

Database will be created in memory

noblob?: boolean

Server should send BLOB columns

non_linearizable?: boolean

Request for immediate responses from the server node without waiting for linerizability guarantees

password?: string

Password is required unless connection string is provided

password_hashed?: boolean

True if password is hashed, default is false

port?: number

Port number for tls socket

timeout?: number

Optional query timeout passed directly to TLS socket

tlsoptions?: ConnectionOptions

Custom options and configurations for tls socket, eg: additional certificates

username?: string

User name is required unless connectionstring is provided

usewebsocket?: boolean

True if we should force use of SQLite Cloud Gateway and websocket connections, default: true in browsers, false in node.js

verbose?: boolean

True if connection should enable debug logs

zerotext?: boolean

Flag to tell the server to zero-terminate strings