import type { SQLChunk } from "../core/sql.js"; import type { ColumnConfig } from "../types/index.js"; import type { Table } from "./table.js"; export declare abstract class ConstraintBuilder { abstract build(): Record; } export declare class IndexBuilder extends ConstraintBuilder { readonly name?: string | undefined; readonly isUnique: boolean; private _columns; private _using?; private _where?; constructor(name?: string | undefined, isUnique?: boolean); on(...columns: ColumnConfig[]): this; using(method: "btree" | "hash" | "gin" | "gist" | "brin"): this; where(condition: string): this; build(): { type: string; name: string | undefined; columns: string[]; unique: boolean; using: "brin" | "btree" | "gin" | "gist" | "hash" | undefined; where: string | undefined; }; } export declare class CheckConstraintBuilder extends ConstraintBuilder { readonly condition: SQLChunk; readonly name?: string | undefined; constructor(condition: SQLChunk, name?: string | undefined); build(): { type: string; name: string | undefined; condition: string; }; } export declare class PrimaryKeyBuilder extends ConstraintBuilder { readonly name?: string | undefined; private _columns; constructor(name?: string | undefined); on(...columns: ColumnConfig[]): this; build(): { type: string; name: string | undefined; columns: string[]; }; } export declare class ForeignKeyBuilder extends ConstraintBuilder { readonly name?: string | undefined; private _columns; private _foreignTable?; private _foreignColumns; private _onDelete?; private _onUpdate?; constructor(name?: string | undefined); on(...columns: ColumnConfig[]): this; references(table: Table>>, ...columns: ColumnConfig[]): this; onDelete(action: "cascade" | "set null" | "set default" | "restrict" | "no action"): this; onUpdate(action: "cascade" | "set null" | "set default" | "restrict" | "no action"): this; build(): { type: string; name: string | undefined; columns: string[]; foreignTable: string; foreignColumns: string[]; onDelete: "cascade" | "no action" | "restrict" | "set default" | "set null" | undefined; onUpdate: "cascade" | "no action" | "restrict" | "set default" | "set null" | undefined; }; } export declare const index: (name?: string) => IndexBuilder; export declare const unique: (name?: string) => IndexBuilder; export declare const check: (condition: SQLChunk, name?: string) => CheckConstraintBuilder; export declare const primaryKey: (name?: string) => PrimaryKeyBuilder; export declare const foreignKey: (name?: string) => ForeignKeyBuilder; //# sourceMappingURL=indexes.d.ts.map