@trudb/tru-common-lib 0.0.261 → 0.0.263

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.
@@ -642,7 +642,7 @@ TruFormulaEval.compareResultForMismatchedParams = {
642
642
  class TruPredicate {
643
643
  constructor(field, operator, value, propertyQueryPath, overQuoted = false) {
644
644
  this._breezePredicate = null;
645
- this.handleOperator = (fieldOrPredicate, operator, value, oper) => {
645
+ this.handleOperator = (fieldOrPredicate, oper, operator, value) => {
646
646
  var breezePredicate;
647
647
  if (Array.isArray(fieldOrPredicate)) {
648
648
  breezePredicate = new TruPredicate(fieldOrPredicate[0], fieldOrPredicate[1], fieldOrPredicate[2], []);
@@ -658,11 +658,11 @@ class TruPredicate {
658
658
  };
659
659
  this.and = (fieldOrPredicate, operator, value) => {
660
660
  var that = this;
661
- return this.handleOperator(fieldOrPredicate, operator, value, function (p) { return that._breezePredicate.and(p); });
661
+ return this.handleOperator(fieldOrPredicate, function (p) { return that._breezePredicate.and(p); }, operator, value);
662
662
  };
663
663
  this.or = (fieldOrPredicate, operator, value) => {
664
664
  var that = this;
665
- return this.handleOperator(fieldOrPredicate, operator, value, function (p) { return that._breezePredicate.or(p); });
665
+ return this.handleOperator(fieldOrPredicate, function (p) { return that._breezePredicate.and(p); }, operator, value);
666
666
  };
667
667
  this.not = () => {
668
668
  var breezePredicate = this._breezePredicate.not();
@@ -787,7 +787,7 @@ class TruPropertyConfigZipCode extends TruPropertyConfigBase {
787
787
  class TruQueryPredicateManager {
788
788
  constructor(propertyQueryPath, predicateName, predicateMap) {
789
789
  this._predicate = null;
790
- this._propertyQueryPath = null;
790
+ this._propertyQueryPath = [];
791
791
  this._predicateName = '';
792
792
  this._predicateMap = {};
793
793
  this.setPredicate = (queryPredicate) => {
@@ -808,12 +808,6 @@ class TruQueryPredicateManager {
808
808
  this.clear = () => {
809
809
  this.setPredicate(null);
810
810
  };
811
- //set = (queryPredicate: TruPredicate) => {
812
- // if (this._predicate !== queryPredicate && this._predicateMap !== null) {
813
- // this._predicate = queryPredicate;
814
- // this._predicateMap[this._predicateName] = this._predicate === null ? null : this._predicate;
815
- // }
816
- //}
817
811
  /**
818
812
  * Returns a new query predicate.
819
813
  *
@@ -821,7 +815,7 @@ class TruQueryPredicateManager {
821
815
  * @param {string} operator - Name of the predicate operator.
822
816
  * @param {*} value - Literal value.
823
817
  */
824
- this.create = (field, operator, value, overQuoted) => {
818
+ this.create = (field, operator, value, overQuoted = false) => {
825
819
  return new TruPredicate(field, operator, value, this._propertyQueryPath, overQuoted)._breezePredicate;
826
820
  };
827
821
  this.set = (fieldOrPredicate, operator, value, overQuoted = false) => {