sql-switch - v2.0.0
    Preparing search index...

    Interface DALConfig

    Root config object passed to db.connect().

    Declare both engines up front and select the active one with db. Every declared block is validated at connect(), so a bad cloud connectionString is caught at boot even while you're still running db: 'local'. Flip the active engine at runtime with db.reconnect('cloud' | 'local') — that reconnects only, it does not move data; use engineSwap() / db.swapEngine() when you need the rows to travel too.

    local may be omitted (every SQLite setting has a default). cloud is required whenever db is 'cloud', because a Postgres connectionString has no default.

    interface DALConfig {
        db: "local" | "cloud";
        local?: SqliteConfig;
        cloud?: PostgresConfig;
        collector?: CollectorConfig;
    }
    Index
    db: "local" | "cloud"

    Which declared engine is active.

    local?: SqliteConfig

    SQLite settings (local mode). Omit to accept every default.

    PostgreSQL settings (cloud mode). Required when db is 'cloud'.

    collector?: CollectorConfig

    Write collector configuration. Defaults to enabled with a 3s flush interval.