/** * Column Operations Module * Handles column comparison, addition, modification, and dropping logic */ import type { ILegacySyncOptions, TArray } from '../../types'; import { type SyncDbSide } from '../syncClient'; import type { Client } from 'pg'; interface ColumnInfo { table_name: string; column_name: string; data_type: string; resolved_type?: string; udt_schema?: string; udt_name?: string; character_maximum_length?: number; is_nullable: 'YES' | 'NO'; column_default?: string; ordinal_position: number; } export declare class ColumnOperations { private sourceClient; private targetClient; private options; constructor(sourceClient: Client, targetClient: Client, options: ILegacySyncOptions); /** * Get all columns from a schema on the given database. */ getColumns(side: SyncDbSide): Promise>; /** * Group columns by table name */ groupColumnsByTable(columns: TArray): Record>; /** * Generate column definition string */ generateColumnDefinition(column: ColumnInfo): string; /** * Generate ALTER COLUMN statement for modifications */ generateAlterColumnStatement(tableName: string, sourceCol: ColumnInfo, targetCol: ColumnInfo): string; /** * Handle columns that need to be dropped */ handleColumnsToDrop(tableName: string, columnsToDrop: TArray, alterStatements: TArray): void; /** * Handle column modification with detailed comments */ handleColumnModification(tableName: string, sourceCol: ColumnInfo, targetCol: ColumnInfo, alterStatements: TArray): void; /** * Handle columns that need to be added or modified */ private isLikelyForeignKeyColumn; private isNumericIdentifierType; private requiresManualBackfill; handleColumnsToAddOrModify(tableName: string, sourceTableCols: TArray, targetTableCols: TArray, alterStatements: TArray): void; /** * Get default value for a data type */ private getDefaultValueForType; /** * Generate column operations for schema sync */ generateColumnOperations(): Promise>; } export {}; //# sourceMappingURL=columns.d.ts.map