Interface SupabaseAdapterOptions

Options accepted when opening a storage adapter.

interface SupabaseAdapterOptions {
    connectionString?: string;
    poolConfig?: {
        max?: number;
        min?: number;
        idleTimeoutMillis?: number;
        connectionTimeoutMillis?: number;
    };
    ssl?: boolean | {
        rejectUnauthorized: boolean;
        ca?: string;
    };
    filePath?: string;
    readOnly?: boolean;
    adapterOptions?: Record<string, unknown>;
    foreignKeys?: boolean;
}

Hierarchy (view full)

Properties

connectionString?: string

Connection string (PostgreSQL, etc.).

poolConfig?: {
    max?: number;
    min?: number;
    idleTimeoutMillis?: number;
    connectionTimeoutMillis?: number;
}
ssl?: boolean | {
    rejectUnauthorized: boolean;
    ca?: string;
}

TLS: false turns it off; an object (with ca to verify Supabase's certificate) is passed to pg; otherwise TLS without verification.

filePath?: string

Absolute path to the primary database file (when applicable).

readOnly?: boolean

Optional flag to force read-only mode.

adapterOptions?: Record<string, unknown>

Arbitrary adapter-specific options bag.

foreignKeys?: boolean

SQLite: true turns foreign-key enforcement on and false turns it off (PRAGMA foreign_keys) when the adapter opens. On sql.js and IndexedDB it holds when sql.js reopens its connection (a save, an export, an import), as a PRAGMA foreign_keys statement run later does. Left out, each engine keeps its default: better-sqlite3 is built with SQLITE_DEFAULT_FOREIGN_KEYS=1 and enforces them, and the Capacitor plugin turns them on when it opens a database; sql.js and IndexedDB do not. PostgreSQL always enforces foreign keys and ignores this.