boolean.js 641 B

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