Files
klz-cables.com/.pnpm-store/v10/files/9a/05e85f5d50cedfff2edd50b51845dc774af3d2961317d9f4a6c3744a8448ea01d569dc036cc6baaabd7f815411242906a26ef0a67401ce23c427d14a6aab5a
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

39 lines
1.2 KiB
Plaintext

import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
class MySqlRealBuilder extends MySqlColumnBuilderWithAutoIncrement {
static [entityKind] = "MySqlRealBuilder";
constructor(name, config) {
super(name, "number", "MySqlReal");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
}
/** @internal */
build(table) {
return new MySqlReal(table, this.config);
}
}
class MySqlReal extends MySqlColumnWithAutoIncrement {
static [entityKind] = "MySqlReal";
precision = this.config.precision;
scale = this.config.scale;
getSQLType() {
if (this.precision !== void 0 && this.scale !== void 0) {
return `real(${this.precision}, ${this.scale})`;
} else if (this.precision === void 0) {
return "real";
} else {
return `real(${this.precision})`;
}
}
}
function real(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlRealBuilder(name, config);
}
export {
MySqlReal,
MySqlRealBuilder,
real
};
//# sourceMappingURL=real.js.map