Beignet API reference
    Preparing search index...

    Interface DbPort<TSchema>

    Typed database port interface. Exposes a typed Drizzle database instance for your schema.

    interface DbPort<
        TSchema extends Record<string, unknown> = Record<string, unknown>,
    > {
        drizzle: NodePgDatabase<TSchema>;
        pool: Pool;
        checkHealth(): Promise<DbHealth>;
    }

    Type Parameters

    • TSchema extends Record<string, unknown> = Record<string, unknown>

      The Drizzle schema type (e.g., typeof schema)

    Index
    drizzle: NodePgDatabase<TSchema>

    The typed Drizzle database instance. Use this to query your database with full type safety.

    pool: Pool

    The underlying node-postgres connection pool. Use this for advanced operations not covered by Drizzle ORM.

    • Check whether the underlying database pool can run a cheap read query.

      Intended for app-owned readiness endpoints. This does not run migrations or mutate schema.

      Returns Promise<DbHealth>