smallint.js 701 B

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