boolean.js 628 B

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