/** * PostgreSQL Introspection Tools - Shared Helpers * * Common types, utility functions, and shared database queries * used by graph analysis and schema analysis tools. */ import type { PostgresAdapter } from "../../postgres-adapter.js"; export interface FkEdge { constraintName: string; fromSchema: string; fromTable: string; fromColumns: string[]; toSchema: string; toTable: string; toColumns: string[]; onDelete: string; onUpdate: string; } export interface TableNode { schema: string; table: string; rowCount?: number; sizeBytes?: number; } /** * Fetch all foreign key relationships across user schemas */ export declare function fetchForeignKeys(adapter: PostgresAdapter, schemaFilter?: string, excludeExtensionSchemas?: boolean): Promise; /** * Fetch all user tables with row counts and sizes */ export declare function fetchTableNodes(adapter: PostgresAdapter, schemaFilter?: string, excludeExtensionSchemas?: boolean): Promise; /** * Parse PostgreSQL array column (handles both native arrays and string format) */ export declare function parseArrayColumn(value: unknown): string[]; /** * Create qualified table name */ export declare function qualifiedName(schema: string, table: string): string; /** * Check if a schema exists in the database. * Returns null if schema exists or no filter specified, or error response if nonexistent. */ export declare function checkSchemaExists(adapter: PostgresAdapter, schemaFilter?: string): Promise; /** * Check if a table exists in the database. * Returns null if table exists or no filter specified, or error response if nonexistent. */ export declare function checkTableExists(adapter: PostgresAdapter, tableFilter?: string, schemaFilter?: string): Promise; //# sourceMappingURL=helpers.d.ts.map