bytes.js 632 B

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