TenantAtlas/apps/platform/.pnpm-store/v10/files/d6/7ace445dba596241fc000577d9e60da2509274c5c1c1453de97f9c6e9935b76607a434adb1ff5775d14075604f8f0a38eaec6c55a1bc8baba89d4231a799e5
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

37 lines
831 B
Plaintext

import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgRealBuilder extends PgColumnBuilder {
static [entityKind] = "PgRealBuilder";
constructor(name, length) {
super(name, "number", "PgReal");
this.config.length = length;
}
/** @internal */
build(table) {
return new PgReal(table, this.config);
}
}
class PgReal extends PgColumn {
static [entityKind] = "PgReal";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return "real";
}
mapFromDriverValue = (value) => {
if (typeof value === "string") {
return Number.parseFloat(value);
}
return value;
};
}
function real(name) {
return new PgRealBuilder(name ?? "");
}
export {
PgReal,
PgRealBuilder,
real
};
//# sourceMappingURL=real.js.map