import { AnySQLiteColumn } from './columns'; import { AnySQLiteTable } from './table'; export declare type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default'; export declare type Reference = () => { readonly columns: AnySQLiteColumn[]; readonly foreignTable: AnySQLiteTable; readonly foreignColumns: AnySQLiteColumn[]; }; export declare class ForeignKeyBuilder { protected $brand: 'SQLiteForeignKeyBuilder'; protected $foreignTableName: 'TForeignTableName'; constructor(config: () => { columns: AnySQLiteColumn[]; foreignColumns: AnySQLiteColumn[]; }, actions?: { onUpdate?: UpdateDeleteAction; onDelete?: UpdateDeleteAction; } | undefined); onUpdate(action: UpdateDeleteAction): this; onDelete(action: UpdateDeleteAction): this; } export declare class ForeignKey { readonly table: AnySQLiteTable; readonly reference: Reference; readonly onUpdate: UpdateDeleteAction | undefined; readonly onDelete: UpdateDeleteAction | undefined; constructor(table: AnySQLiteTable, builder: ForeignKeyBuilder); getName(): string; } declare type ColumnsWithTable = { [Key in keyof TColumns]: AnySQLiteColumn<{ tableName: TTableName; }>; }; export declare type GetColumnsTable = (TColumns extends AnySQLiteColumn ? TColumns : TColumns extends AnySQLiteColumn[] ? TColumns[number] : never) extends AnySQLiteColumn<{ tableName: infer TTableName extends string; }> ? TTableName : never; export declare function foreignKey, ...AnySQLiteColumn<{ tableName: TTableName; }>[]]>(config: () => { columns: TColumns; foreignColumns: ColumnsWithTable; }): ForeignKeyBuilder; export {}; //# sourceMappingURL=foreign-keys.d.ts.map