checks.cjs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 checks_exports = {};
  20. __export(checks_exports, {
  21. Check: () => Check,
  22. CheckBuilder: () => CheckBuilder,
  23. check: () => check
  24. });
  25. module.exports = __toCommonJS(checks_exports);
  26. var import_entity = require("../entity.cjs");
  27. class CheckBuilder {
  28. constructor(name, value) {
  29. this.name = name;
  30. this.value = value;
  31. }
  32. static [import_entity.entityKind] = "SQLiteCheckBuilder";
  33. brand;
  34. build(table) {
  35. return new Check(table, this);
  36. }
  37. }
  38. class Check {
  39. constructor(table, builder) {
  40. this.table = table;
  41. this.name = builder.name;
  42. this.value = builder.value;
  43. }
  44. static [import_entity.entityKind] = "SQLiteCheck";
  45. name;
  46. value;
  47. }
  48. function check(name, value) {
  49. return new CheckBuilder(name, value);
  50. }
  51. // Annotate the CommonJS export names for ESM import in node:
  52. 0 && (module.exports = {
  53. Check,
  54. CheckBuilder,
  55. check
  56. });
  57. //# sourceMappingURL=checks.cjs.map