TenantAtlas/apps/platform/.pnpm-store/v10/files/b9/a1e3507c766533642334e6c659122b580aba7047a380d1abf85e1d4f0bc9ef025122f4104f09f77f85f2e917340451362d10644d58213837df871e2d1abd19
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

51 lines
1.5 KiB
Plaintext

import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
class SingleStoreTextBuilder extends SingleStoreColumnBuilder {
static [entityKind] = "SingleStoreTextBuilder";
constructor(name, textType, config) {
super(name, "string", "SingleStoreText");
this.config.textType = textType;
this.config.enumValues = config.enum;
}
/** @internal */
build(table) {
return new SingleStoreText(
table,
this.config
);
}
}
class SingleStoreText extends SingleStoreColumn {
static [entityKind] = "SingleStoreText";
textType = this.config.textType;
enumValues = this.config.enumValues;
getSQLType() {
return this.textType;
}
}
function text(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new SingleStoreTextBuilder(name, "text", config);
}
function tinytext(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new SingleStoreTextBuilder(name, "tinytext", config);
}
function mediumtext(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new SingleStoreTextBuilder(name, "mediumtext", config);
}
function longtext(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new SingleStoreTextBuilder(name, "longtext", config);
}
export {
SingleStoreText,
SingleStoreTextBuilder,
longtext,
mediumtext,
text,
tinytext
};
//# sourceMappingURL=text.js.map