drizzle-orm
Version:
Drizzle ORM package for SQL databases
29 lines • 692 B
JavaScript
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgTextBuilder extends PgColumnBuilder {
static [entityKind] = "PgTextBuilder";
constructor(name, config) {
super(name, "string", "PgText");
this.config.enumValues = config.enum;
}
/** @internal */
build(table) {
return new PgText(table, this.config);
}
}
class PgText extends PgColumn {
static [entityKind] = "PgText";
enumValues = this.config.enumValues;
getSQLType() {
return "text";
}
}
function text(name, config = {}) {
return new PgTextBuilder(name, config);
}
export {
PgText,
PgTextBuilder,
text
};
//# sourceMappingURL=text.js.map