bigintT.js 784 B

12345678910111213141516171819202122232425262728293031323334
  1. import { entityKind } from "../../entity.js";
  2. import { GelColumn } from "./common.js";
  3. import { GelIntColumnBaseBuilder } from "./int.common.js";
  4. class GelBigInt64Builder extends GelIntColumnBaseBuilder {
  5. static [entityKind] = "GelBigInt64Builder";
  6. constructor(name) {
  7. super(name, "bigint", "GelBigInt64");
  8. }
  9. /** @internal */
  10. build(table) {
  11. return new GelBigInt64(
  12. table,
  13. this.config
  14. );
  15. }
  16. }
  17. class GelBigInt64 extends GelColumn {
  18. static [entityKind] = "GelBigInt64";
  19. getSQLType() {
  20. return "edgedbt.bigint_t";
  21. }
  22. mapFromDriverValue(value) {
  23. return BigInt(value);
  24. }
  25. }
  26. function bigintT(name) {
  27. return new GelBigInt64Builder(name ?? "");
  28. }
  29. export {
  30. GelBigInt64,
  31. GelBigInt64Builder,
  32. bigintT
  33. };
  34. //# sourceMappingURL=bigintT.js.map