json.js 660 B

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