Files
klz-cables.com/.pnpm-store/v10/files/d3/5e22e0eeeb1da37d52d191cd92fcdbb0329bd3c1c6b95a57611dfc634894701267ce707b6b5a93134b1cb7f4f737fd7e016caeb93451e534437e0374becedd
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

43 lines
1.3 KiB
Plaintext

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