/** * Database Import — introspection layer * * Reads the schema of a live Postgres/Supabase database. This layer is * deliberately thin and side-effect-light: it only issues read-only SELECTs * against information_schema/pg_catalog and returns an `IntrospectedSchema`. * All interpretation lives in the conversion layer (pg-to-apsorc.ts). * * `pg` is loaded lazily so importing this module (e.g. from the command) does * not pull the driver until an actual connection is made. */ import { IntrospectedSchema, Introspector } from "./types"; /** Supabase- and Postgres-managed schemas we never import from. */ export declare const SYSTEM_SCHEMAS: Set; /** Strip credentials from a connection string for safe display in errors. */ export declare function redactConnectionString(input: string): string; /** * Reads schema metadata from a Postgres database via a connection string. * SSL is enabled by default (Supabase requires it). */ export declare class PgIntrospector implements Introspector { private readonly connectionString; constructor(connectionString: string); private connect; introspect(schema: string): Promise; } interface RawRows { tableRows: any[]; columnRows: any[]; pkRows: any[]; fkRows: any[]; uniqueRows: any[]; indexRows: any[]; enumRows: any[]; schemaRows: any[]; } /** * Assemble raw query rows into an IntrospectedSchema. Exported (separate from * the DB connection) so it can be unit-tested with fixture rows. */ export declare function buildSchema(schema: string, raw: RawRows): IntrospectedSchema; export {};