uuid.js 601 B

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