import type { PostgresAccessor } from '../../accessor/postgres.ts'; import type { ColumnInfo, ForeignKey, IndexInfo, Relationship } from './client.ts'; interface DatabaseTable { schema: string; name: string; row_count_estimate: number; size_bytes_estimate: number; } interface DatabaseView { schema: string; name: string; kind: 'view' | 'materialized'; } export interface DatabaseJson { database: string; schemas: string[]; tables: DatabaseTable[]; views: DatabaseView[]; relationships: Relationship[]; } interface EntityColumn extends ColumnInfo { primary_key?: boolean; references?: { schema: string; table: string; column: string; }; } export interface EntitySchemaJson { schema: string; name: string; kind: string; columns: EntityColumn[]; primary_key: string[]; foreign_keys: ForeignKey[]; indexes: IndexInfo[]; row_count_estimate: number; size_bytes_estimate: number; } export declare function buildDatabaseJson(accessor: PostgresAccessor): Promise; export declare function buildEntitySchemaJson(accessor: PostgresAccessor, schema: string, name: string, kind: string): Promise; export declare function databaseNameFromDsn(dsn: string): string; export {}; //# sourceMappingURL=_schema_json.d.ts.map