Files
klz-cables.com/.pnpm-store/v10/files/11/7a7c2d08220d40967a36a4cc568a901b7bda430dd81e5917a33202ecf6f06159c21ea857c0a04d23419ed5f88985158b6359dfe903fb28074de3c8f7fc4085
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

36 lines
1.0 KiB
Plaintext

import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
class MySqlIntBuilder extends MySqlColumnBuilderWithAutoIncrement {
static [entityKind] = "MySqlIntBuilder";
constructor(name, config) {
super(name, "number", "MySqlInt");
this.config.unsigned = config ? config.unsigned : false;
}
/** @internal */
build(table) {
return new MySqlInt(table, this.config);
}
}
class MySqlInt extends MySqlColumnWithAutoIncrement {
static [entityKind] = "MySqlInt";
getSQLType() {
return `int${this.config.unsigned ? " unsigned" : ""}`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number(value);
}
return value;
}
}
function int(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlIntBuilder(name, config);
}
export {
MySqlInt,
MySqlIntBuilder,
int
};
//# sourceMappingURL=int.js.map