checks.cjs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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] = "MySqlCheckBuilder";
  33. brand;
  34. /** @internal */
  35. build(table) {
  36. return new Check(table, this);
  37. }
  38. }
  39. class Check {
  40. constructor(table, builder) {
  41. this.table = table;
  42. this.name = builder.name;
  43. this.value = builder.value;
  44. }
  45. static [import_entity.entityKind] = "MySqlCheck";
  46. name;
  47. value;
  48. }
  49. function check(name, value) {
  50. return new CheckBuilder(name, value);
  51. }
  52. // Annotate the CommonJS export names for ESM import in node:
  53. 0 && (module.exports = {
  54. Check,
  55. CheckBuilder,
  56. check
  57. });
  58. //# sourceMappingURL=checks.cjs.map