text.js 640 B

12345678910111213141516171819202122232425262728
  1. import { entityKind } from "../../entity.js";
  2. import { GelColumn, GelColumnBuilder } from "./common.js";
  3. class GelTextBuilder extends GelColumnBuilder {
  4. static [entityKind] = "GelTextBuilder";
  5. constructor(name) {
  6. super(name, "string", "GelText");
  7. }
  8. /** @internal */
  9. build(table) {
  10. return new GelText(table, this.config);
  11. }
  12. }
  13. class GelText extends GelColumn {
  14. static [entityKind] = "GelText";
  15. enumValues = this.config.enumValues;
  16. getSQLType() {
  17. return "text";
  18. }
  19. }
  20. function text(name) {
  21. return new GelTextBuilder(name ?? "");
  22. }
  23. export {
  24. GelText,
  25. GelTextBuilder,
  26. text
  27. };
  28. //# sourceMappingURL=text.js.map