TenantAtlas/apps/platform/.pnpm-store/v10/files/4c/86a3a6eb985ef4b38a019969802fe8c327282e646743d16dc122980b398fc74e49e079a4bb0e854e132b35656c800c6ba140b0ba76630dd8f1cc92268957a9
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

36 lines
964 B
Plaintext

import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlCharBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlCharBuilder";
constructor(name, config) {
super(name, "string", "MySqlChar");
this.config.length = config.length;
this.config.enum = config.enum;
}
/** @internal */
build(table) {
return new MySqlChar(
table,
this.config
);
}
}
class MySqlChar extends MySqlColumn {
static [entityKind] = "MySqlChar";
length = this.config.length;
enumValues = this.config.enum;
getSQLType() {
return this.length === void 0 ? `char` : `char(${this.length})`;
}
}
function char(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlCharBuilder(name, config);
}
export {
MySqlChar,
MySqlCharBuilder,
char
};
//# sourceMappingURL=char.js.map