bigintT.cjs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. "use strict";
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __hasOwnProp = Object.prototype.hasOwnProperty;
  6. var __export = (target, all) => {
  7. for (var name in all)
  8. __defProp(target, name, { get: all[name], enumerable: true });
  9. };
  10. var __copyProps = (to, from, except, desc) => {
  11. if (from && typeof from === "object" || typeof from === "function") {
  12. for (let key of __getOwnPropNames(from))
  13. if (!__hasOwnProp.call(to, key) && key !== except)
  14. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  15. }
  16. return to;
  17. };
  18. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  19. var bigintT_exports = {};
  20. __export(bigintT_exports, {
  21. GelBigInt64: () => GelBigInt64,
  22. GelBigInt64Builder: () => GelBigInt64Builder,
  23. bigintT: () => bigintT
  24. });
  25. module.exports = __toCommonJS(bigintT_exports);
  26. var import_entity = require("../../entity.cjs");
  27. var import_common = require("./common.cjs");
  28. var import_int_common = require("./int.common.cjs");
  29. class GelBigInt64Builder extends import_int_common.GelIntColumnBaseBuilder {
  30. static [import_entity.entityKind] = "GelBigInt64Builder";
  31. constructor(name) {
  32. super(name, "bigint", "GelBigInt64");
  33. }
  34. /** @internal */
  35. build(table) {
  36. return new GelBigInt64(
  37. table,
  38. this.config
  39. );
  40. }
  41. }
  42. class GelBigInt64 extends import_common.GelColumn {
  43. static [import_entity.entityKind] = "GelBigInt64";
  44. getSQLType() {
  45. return "edgedbt.bigint_t";
  46. }
  47. mapFromDriverValue(value) {
  48. return BigInt(value);
  49. }
  50. }
  51. function bigintT(name) {
  52. return new GelBigInt64Builder(name ?? "");
  53. }
  54. // Annotate the CommonJS export names for ESM import in node:
  55. 0 && (module.exports = {
  56. GelBigInt64,
  57. GelBigInt64Builder,
  58. bigintT
  59. });
  60. //# sourceMappingURL=bigintT.cjs.map