inet.js 588 B

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