/** * Database Import — pg-backed data access for the copy executor. * * Thin wrappers around `pg` implementing the SourceReader / TargetWriter * interfaces from copy-data.ts. `pg` is imported lazily and SSL is enabled by * default (Supabase requires it). Integration-level: covered by manual/E2E * runs, while the copy logic itself is unit-tested with fakes. */ import { SourceReader, TargetWriter } from "./copy-data"; /** Reads rows from the source database (read-only). */ export declare class PgSourceReader implements SourceReader { private readonly client; private readonly schema; private constructor(); static connect(connectionString: string, schema: string): Promise; totalRows(table: string): Promise; readBatch(table: string, columns: string[], orderBy: string | null, offset: number, limit: number): Promise; close(): Promise; } /** Writes rows into the target database within a single transaction. */ export declare class PgTargetWriter implements TargetWriter { private readonly client; private readonly schema; private constructor(); static connect(connectionString: string, schema: string): Promise; rowCount(table: string): Promise; insertBatch(table: string, columns: string[], rows: unknown[][]): Promise; resetSequence(table: string, column: string): Promise; begin(): Promise; commit(): Promise; rollback(): Promise; close(): Promise; }