real.js 703 B

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