Core - v1.0.0
    Preparing search index...

    Interface SqlConnectionProvider<TRuntime>

    Supplies connection details for an external SQL database.

    Deliberately not a query interface — it hands over credentials and stops there, leaving the driver to the caller. That separation is what makes the capability usable with whichever client the database needs, rather than committing the whole application to one.

    Treat everything returned as short-lived: an implementation that pools connections may mint credentials per instance, so caching them beyond the current one is a bug that only appears under load.

    Bayu Dwiyan Satria

    1.0.0

    1.0.0

    interface SqlConnectionProvider<TRuntime = unknown> {
        connectionString(runtime: TRuntime): string;
        credentials(runtime: TRuntime): SqlCredentials;
        isAvailable(runtime: TRuntime): boolean;
        target(runtime: TRuntime): SqlTarget;
    }

    Type Parameters

    • TRuntime = unknown

      The runtime handle the provider is resolved from.

    Hierarchy (View Summary)

    Index
    • Reports whether the capability is actually usable on this runtime.

      Parameters

      Returns boolean

      true when calls will reach a real backing resource.

      A capability backed by an optional resource answers false when that resource was never provisioned. Implementations must document what each method does in that state — degrade or throw — and must not vary it, since a caller choosing between two implementations is relying on the answer meaning the same thing in both.