text.cjs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. "use strict";
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __hasOwnProp = Object.prototype.hasOwnProperty;
  6. var __export = (target, all) => {
  7. for (var name in all)
  8. __defProp(target, name, { get: all[name], enumerable: true });
  9. };
  10. var __copyProps = (to, from, except, desc) => {
  11. if (from && typeof from === "object" || typeof from === "function") {
  12. for (let key of __getOwnPropNames(from))
  13. if (!__hasOwnProp.call(to, key) && key !== except)
  14. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  15. }
  16. return to;
  17. };
  18. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  19. var text_exports = {};
  20. __export(text_exports, {
  21. GelText: () => GelText,
  22. GelTextBuilder: () => GelTextBuilder,
  23. text: () => text
  24. });
  25. module.exports = __toCommonJS(text_exports);
  26. var import_entity = require("../../entity.cjs");
  27. var import_common = require("./common.cjs");
  28. class GelTextBuilder extends import_common.GelColumnBuilder {
  29. static [import_entity.entityKind] = "GelTextBuilder";
  30. constructor(name) {
  31. super(name, "string", "GelText");
  32. }
  33. /** @internal */
  34. build(table) {
  35. return new GelText(table, this.config);
  36. }
  37. }
  38. class GelText extends import_common.GelColumn {
  39. static [import_entity.entityKind] = "GelText";
  40. enumValues = this.config.enumValues;
  41. getSQLType() {
  42. return "text";
  43. }
  44. }
  45. function text(name) {
  46. return new GelTextBuilder(name ?? "");
  47. }
  48. // Annotate the CommonJS export names for ESM import in node:
  49. 0 && (module.exports = {
  50. GelText,
  51. GelTextBuilder,
  52. text
  53. });
  54. //# sourceMappingURL=text.cjs.map