import { type GeneratorMetadata } from "../types.ts"; /** * Minimal structural database interface. `pg.Pool` / `pg.Client` satisfy it, * as do Bun and other drivers. postgres-meta injects its forked-pg pool here, * keeping its own error handling on its side of the boundary. Errors throw; * callers adapt. */ export interface Queryable { query(sql: string): Promise<{ rows: any[]; }>; } export interface IntrospectOptions { includedSchemas?: string[]; excludedSchemas?: string[]; } /** * Introspect a database into the `GeneratorMetadata` contract. * * Port of `getGeneratorMetadata` from `postgres-meta/src/lib/generators.ts`. * Instead of going through the `PostgresMeta*` manager classes, it calls the * ported SQL builders directly with the single option combination the * generator path uses, then applies the int8 `normalize` coercion so output is * identical regardless of driver. Connection lifecycle is the caller's * responsibility — unlike `getGeneratorMetadata`, this does not end the pool. */ export declare function introspect(db: Queryable, opts?: IntrospectOptions): Promise;