@trudb/tru-common-lib 0.0.258 → 0.0.260
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.
- package/esm2020/lib/classes/tru-query-predicate-manager.mjs +19 -30
- package/fesm2015/trudb-tru-common-lib.mjs +18 -29
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +18 -29
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/classes/tru-query-predicate-manager.d.ts +12 -21
- package/package.json +1 -1
|
@@ -797,43 +797,32 @@ class TruQueryPredicateManager {
|
|
|
797
797
|
}
|
|
798
798
|
};
|
|
799
799
|
/**
|
|
800
|
-
* Returns
|
|
801
|
-
*
|
|
802
|
-
* @param {string} field - Name of the storage field relative to the intent property.
|
|
803
|
-
* @param {string} operator - Name of the predicate operator.
|
|
804
|
-
* @param {*} value - Literal value.
|
|
800
|
+
* Returns the query predicate.
|
|
805
801
|
*/
|
|
806
|
-
this.
|
|
807
|
-
return
|
|
802
|
+
this.get = () => {
|
|
803
|
+
return this._predicate;
|
|
808
804
|
};
|
|
809
805
|
/**
|
|
810
|
-
|
|
811
|
-
|
|
806
|
+
* Clears the query predicate.
|
|
807
|
+
*/
|
|
812
808
|
this.clear = () => {
|
|
813
809
|
this.setPredicate(null);
|
|
814
810
|
};
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
811
|
+
this.set = (queryPredicate) => {
|
|
812
|
+
if (this._predicate !== queryPredicate && this._predicateMap !== null) {
|
|
813
|
+
this._predicate = queryPredicate;
|
|
814
|
+
this._predicateMap[this._predicateName] = this._predicate === null ? null : this._predicate;
|
|
815
|
+
}
|
|
820
816
|
};
|
|
821
817
|
/**
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
this.set = (fieldOrPredicate, operator, value, overQuoted = false) => {
|
|
831
|
-
var predicate;
|
|
832
|
-
if (fieldOrPredicate.constructor === TruPredicate)
|
|
833
|
-
predicate = fieldOrPredicate;
|
|
834
|
-
else
|
|
835
|
-
predicate = this.create(fieldOrPredicate, operator, value, overQuoted);
|
|
836
|
-
this.setPredicate(predicate);
|
|
818
|
+
* Returns a new query predicate.
|
|
819
|
+
*
|
|
820
|
+
* @param {string} field - Name of the storage field relative to the intent property.
|
|
821
|
+
* @param {string} operator - Name of the predicate operator.
|
|
822
|
+
* @param {*} value - Literal value.
|
|
823
|
+
*/
|
|
824
|
+
this.create = (field, operator, value, overQuoted) => {
|
|
825
|
+
return new TruPredicate(field, operator, value, this._propertyQueryPath, overQuoted)._breezePredicate;
|
|
837
826
|
};
|
|
838
827
|
this._propertyQueryPath = propertyQueryPath;
|
|
839
828
|
this._predicateName = predicateName;
|