/** The target shape of a restructured script. */ export type Granularity = 'atomic' | 'object' | 'consolidated'; export interface RestructureOptions { granularity: Granularity; } export interface RestructureResult { /** The restructured script, statements in stable topological order. */ sql: string; /** Number of statements folded into a `CREATE TABLE` (fold direction). */ folded: number; /** Number of statements produced by explosion (atomize direction). */ exploded: number; /** Folds that were rejected (with the reason) and other non-fatal notes. */ warnings: string[]; } type AnyNode = Record; /** * Restructure a DDL script to the requested granularity. The input and * output scripts deploy to identical schemas; only statement shape and * order change. */ export declare function restructureSql(sql: string, options: RestructureOptions): RestructureResult; /** * Re-emit statements in the stable topological order of their dependency * graph. Statements are deparsed and re-classified so the ordering reflects * exactly what will be emitted. */ export declare function orderStatements(stmts: AnyNode[]): AnyNode[]; export {};