Files
klz-cables.com/.pnpm-store/v10/files/13/822d62a4cd8cc211155054088f2b8b50ba6ed74a14062f4619e3f5c64de5e8bcd0841e469a9d72d06c902340de09faf542aca86c3a6f003da0181924c273ed
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

60 lines
1.2 KiB
Plaintext

import { entityKind } from "../entity.js";
class IndexBuilderOn {
constructor(name, unique) {
this.name = name;
this.unique = unique;
}
static [entityKind] = "SingleStoreIndexBuilderOn";
on(...columns) {
return new IndexBuilder(this.name, columns, this.unique);
}
}
class IndexBuilder {
static [entityKind] = "SingleStoreIndexBuilder";
/** @internal */
config;
constructor(name, columns, unique) {
this.config = {
name,
columns,
unique
};
}
using(using) {
this.config.using = using;
return this;
}
algorythm(algorythm) {
this.config.algorythm = algorythm;
return this;
}
lock(lock) {
this.config.lock = lock;
return this;
}
/** @internal */
build(table) {
return new Index(this.config, table);
}
}
class Index {
static [entityKind] = "SingleStoreIndex";
config;
constructor(config, table) {
this.config = { ...config, table };
}
}
function index(name) {
return new IndexBuilderOn(name, false);
}
function uniqueIndex(name) {
return new IndexBuilderOn(name, true);
}
export {
Index,
IndexBuilder,
IndexBuilderOn,
index,
uniqueIndex
};
//# sourceMappingURL=indexes.js.map