import { type ClickHouseExecutor } from '@chkit/clickhouse'; import type { ResolvedChxConfig } from '@chkit/core'; import type { ParsedFlags, PluginRuntime, TableScope } from '../../plugins.js'; import type { createJournalStore } from '../../runtime/journal-store.js'; import { type MigrationJournalEntry } from '../../runtime/migration-store.js'; type JournalStore = ReturnType; /** One-line, length-capped preview of a SQL statement for error messages. */ export declare function previewStatement(sql: string, max?: number): string; /** * Wrap a statement-execution failure with the context a user needs to locate * it (#10): the migration file, the failed statement's position, and a SQL * preview — on top of the cleaned ClickHouse message. Without this, a rejected * migration surfaces only the raw CH exception with no file or statement. */ export declare function statementError(input: { file: string; index: number; total: number; statement: string; error: unknown; }): Error; export declare function applyMigration(input: { db: ClickHouseExecutor; journalStore: JournalStore; pluginRuntime: PluginRuntime; config: ResolvedChxConfig; tableScope: TableScope; flags: ParsedFlags; migrationsDir: string; file: string; }): Promise; export {}; //# sourceMappingURL=apply.d.ts.map