/** * Base Generator Class * Abstract base class providing common functionality for all generators */ import type { IDatabaseConnection, IGeneratedFile, IGeneratorOptions, IGeneratorResult } from '../types'; import type { Client } from 'pg'; export declare abstract class BaseGenerator { protected client: Client; protected options: IGeneratorOptions; protected connection: IDatabaseConnection; protected schema: string; constructor(client: Client, connection: IDatabaseConnection, options: IGeneratorOptions); /** * Abstract method to generate content - must be implemented by subclasses */ abstract generate(): Promise; /** * Generate and output files based on options */ execute(): Promise; /** * Get the name of this generator for logging */ protected abstract getGeneratorName(): string; /** * Output files to stdout — kept as plain console.log for piping the generated SQL. */ private outputToStdout; /** * Output files to disk */ private outputToFiles; /** * Generate SQL header with metadata */ protected generateHeader(title: string, description: string): string; /** * Generate SQL footer */ protected generateFooter(): string; /** * Format SQL with proper indentation */ protected formatSQL(sql: string, indentLevel?: number): string; /** * Escape SQL identifiers */ protected escapeIdentifier(identifier: string): string; /** * Escape SQL string literals */ protected escapeString(str: string): string; /** * Generate comment block */ protected generateComment(comment: string): string; /** * Generate section header */ protected generateSectionHeader(title: string): string; /** * Check if generation should be skipped based on options */ protected shouldSkip(): boolean; /** * Validate required data before generation */ protected validateData(): Promise; /** * Get database connection info for logging */ protected getConnectionInfo(): string; /** * Generate schema creation SQL if not using public schema * This ensures generated files can be run on blank databases */ protected generateSchemaCreationSQL(): string; } //# sourceMappingURL=baseGenerator.d.ts.map