Setu-TS
    Preparing search index...

    Interface CustomDatabaseOptions

    The arm supplying an externally-implemented backend.

    adapter is required by the union, so a 'custom' registration that forgets it is a compile error rather than a startup throw.

    import { D1Adapter } from '@setu-ts/cloudflare-plugin';

    app.register(DatabasePlugin({
    type: 'custom',
    adapter: new D1Adapter(env.DB as ID1Database),
    }));

    0.2.0

    interface CustomDatabaseOptions {
        adapter: IDatabaseAdapter;
        name?: string;
        options?: DatabaseAdapterOptions;
        readiness?: DatabaseReadinessOptions;
        type: "custom";
    }

    Hierarchy (View Summary)

    Index

    The backend to use, already constructed. The plugin calls connect() on it during register() and disconnect() during shutdown; it never constructs or replaces it.

    0.2.0

    name?: string

    Named connection for multi-database support. Defaults to 'default'.

    When a name is provided, the service registers under database.<name> (e.g. database.primary); otherwise it uses the canonical CAPABILITIES.DATABASE token. Dot notation, not a colon: createCapabilityToken rejects colons.

    0.1.0

    Adapter-specific options.

    On the 'custom' arm the adapter is already constructed, so only the options the service reads still apply — logQueries routes a custom adapter's data sources through the same single logging wrapper every built-in adapter uses.

    0.1.0

    Optional schema readiness, evaluated by this connection's health indicator.

    0.10.0

    type: "custom"

    Selects the external-adapter arm.