@naturalcycles/db-lib 9.25.0 → 9.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -494,7 +494,12 @@ class CommonDao {
494
494
  return await this.patchByIdInTransaction(id, patch, opt);
495
495
  }
496
496
  let patched;
497
- const loaded = await this.getById(id, opt);
497
+ const loaded = await this.getById(id, {
498
+ // Skipping validation here for performance reasons.
499
+ // Validation is going to happen on save anyway, just down below.
500
+ skipValidation: true,
501
+ ...opt,
502
+ });
498
503
  if (loaded) {
499
504
  patched = { ...loaded, ...patch };
500
505
  if ((0, js_lib_1._deepJsonEquals)(loaded, patched)) {
@@ -545,7 +550,12 @@ class CommonDao {
545
550
  Object.assign(bm, patch);
546
551
  }
547
552
  else {
548
- const loaded = await this.getById(bm.id, opt);
553
+ const loaded = await this.getById(bm.id, {
554
+ // Skipping validation here for performance reasons.
555
+ // Validation is going to happen on save anyway, just down below.
556
+ skipValidation: true,
557
+ ...opt,
558
+ });
549
559
  if (loaded) {
550
560
  const loadedWithPatch = {
551
561
  ...loaded,
package/package.json CHANGED
@@ -45,7 +45,7 @@
45
45
  "engines": {
46
46
  "node": ">=22.10.0"
47
47
  },
48
- "version": "9.25.0",
48
+ "version": "9.26.0",
49
49
  "description": "Lowest Common Denominator API to supported Databases",
50
50
  "keywords": [
51
51
  "db",
@@ -663,7 +663,12 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
663
663
  }
664
664
 
665
665
  let patched: BM
666
- const loaded = await this.getById(id, opt)
666
+ const loaded = await this.getById(id, {
667
+ // Skipping validation here for performance reasons.
668
+ // Validation is going to happen on save anyway, just down below.
669
+ skipValidation: true,
670
+ ...opt,
671
+ })
667
672
 
668
673
  if (loaded) {
669
674
  patched = { ...loaded, ...patch }
@@ -723,7 +728,12 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
723
728
  }
724
729
  Object.assign(bm, patch)
725
730
  } else {
726
- const loaded = await this.getById(bm.id as ID, opt)
731
+ const loaded = await this.getById(bm.id as ID, {
732
+ // Skipping validation here for performance reasons.
733
+ // Validation is going to happen on save anyway, just down below.
734
+ skipValidation: true,
735
+ ...opt,
736
+ })
727
737
 
728
738
  if (loaded) {
729
739
  const loadedWithPatch: BM = {