Interface DatabaseOptions

Database connection options.

interface DatabaseOptions {
    url?: string;
    file?: string;
    postgres?: PostgresAdapterOptions;
    mobile?: CapacitorAdapterOptions;
    type?:
        | "memory"
        | "sqlite"
        | "postgres"
        | "browser"
        | "mobile";
    priority?: AdapterKind[];
}

Properties

url?: string

Database URL (e.g., postgresql://user:pass@host/db). If provided, PostgreSQL will be used.

file?: string

File path for SQLite database. Used for local/offline storage.

PostgreSQL-specific configuration. Automatically uses PostgreSQL when provided.

Mobile (Capacitor) configuration. Automatically detected on mobile platforms.

type?:
    | "memory"
    | "sqlite"
    | "postgres"
    | "browser"
    | "mobile"

Force a specific database type. Leave empty to auto-detect.

priority?: AdapterKind[]

Custom priority order for adapter selection. Advanced: Only use if you need fine-grained control.