Files
klz-cables.com/.pnpm-store/v10/files/6b/85832fc7a5ea4078dc389c4db8f8508dc6a1b5708baf350e9433a48778779739b58f9048becc91417a1ebbc6b20959fe50ef93cd6f55cdd1107e49460289fc
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

66 lines
2.3 KiB
Plaintext

import { entityKind } from "../entity.js";
import type { AnySQLiteColumn, SQLiteColumn } from "./columns/index.js";
import type { SQLiteTable } from "./table.js";
export type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';
export type Reference = () => {
readonly name?: string;
readonly columns: SQLiteColumn[];
readonly foreignTable: SQLiteTable;
readonly foreignColumns: SQLiteColumn[];
};
export declare class ForeignKeyBuilder {
static readonly [entityKind]: string;
_: {
brand: 'SQLiteForeignKeyBuilder';
foreignTableName: 'TForeignTableName';
};
constructor(config: () => {
name?: string;
columns: SQLiteColumn[];
foreignColumns: SQLiteColumn[];
}, actions?: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
} | undefined);
onUpdate(action: UpdateDeleteAction): this;
onDelete(action: UpdateDeleteAction): this;
}
export declare class ForeignKey {
readonly table: SQLiteTable;
static readonly [entityKind]: string;
readonly reference: Reference;
readonly onUpdate: UpdateDeleteAction | undefined;
readonly onDelete: UpdateDeleteAction | undefined;
constructor(table: SQLiteTable, builder: ForeignKeyBuilder);
getName(): string;
}
type ColumnsWithTable<TTableName extends string, TColumns extends SQLiteColumn[]> = {
[Key in keyof TColumns]: AnySQLiteColumn<{
tableName: TTableName;
}>;
};
/**
* @deprecated please use `foreignKey({ columns: [], foreignColumns: [] })` syntax without callback
* @param config
* @returns
*/
export declare function foreignKey<TTableName extends string, TForeignTableName extends string, TColumns extends [AnySQLiteColumn<{
tableName: TTableName;
}>, ...AnySQLiteColumn<{
tableName: TTableName;
}>[]]>(config: () => {
name?: string;
columns: TColumns;
foreignColumns: ColumnsWithTable<TForeignTableName, TColumns>;
}): ForeignKeyBuilder;
export declare function foreignKey<TTableName extends string, TForeignTableName extends string, TColumns extends [AnySQLiteColumn<{
tableName: TTableName;
}>, ...AnySQLiteColumn<{
tableName: TTableName;
}>[]]>(config: {
name?: string;
columns: TColumns;
foreignColumns: ColumnsWithTable<TForeignTableName, TColumns>;
}): ForeignKeyBuilder;
export {};