checks.js 601 B

12345678910111213141516171819202122232425262728293031
  1. import { entityKind } from "../entity.js";
  2. class CheckBuilder {
  3. constructor(name, value) {
  4. this.name = name;
  5. this.value = value;
  6. }
  7. static [entityKind] = "SQLiteCheckBuilder";
  8. brand;
  9. build(table) {
  10. return new Check(table, this);
  11. }
  12. }
  13. class Check {
  14. constructor(table, builder) {
  15. this.table = table;
  16. this.name = builder.name;
  17. this.value = builder.value;
  18. }
  19. static [entityKind] = "SQLiteCheck";
  20. name;
  21. value;
  22. }
  23. function check(name, value) {
  24. return new CheckBuilder(name, value);
  25. }
  26. export {
  27. Check,
  28. CheckBuilder,
  29. check
  30. };
  31. //# sourceMappingURL=checks.js.map