mongodb-query-util 2.2.6 → 2.2.8

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.
@@ -16,6 +16,7 @@ const bsonEqual = (value, other) => {
16
16
  if (['Int32', 'Double'].includes(bsontype)) {
17
17
  return value.value === other.value;
18
18
  }
19
+ // for all others, use native comparisons
19
20
  return undefined;
20
21
  };
21
22
  exports.bsonEqual = bsonEqual;
@@ -1 +1 @@
1
- {"version":3,"file":"bson-equal.js","sourceRoot":"","sources":["../src/bson-equal.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAItB,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,KAAU,EAAuB,EAAE;IACvE,MAAM,QAAQ,GAAG,IAAA,YAAG,EAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IAEpD,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,QAAQ,KAAK,UAAU,EAAE;QAC3B,OAAQ,KAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC7C,OAAO,KAAK,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;KAC9C;IAED,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC1C,OAAQ,KAAwB,CAAC,KAAK,KAAM,KAAwB,CAAC,KAAK,CAAC;KAC5E;IAGD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AArBW,QAAA,SAAS,aAqBpB"}
1
+ {"version":3,"file":"bson-equal.js","sourceRoot":"","sources":["../src/bson-equal.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAItB,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,KAAU,EAAuB,EAAE;IACvE,MAAM,QAAQ,GAAG,IAAA,YAAG,EAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IAEpD,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,QAAQ,KAAK,UAAU,EAAE;QAC3B,OAAQ,KAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC7C,OAAO,KAAK,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;KAC9C;IAED,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC1C,OAAQ,KAAwB,CAAC,KAAK,KAAM,KAAwB,CAAC,KAAK,CAAC;KAC5E;IAED,yCAAyC;IACzC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AArBW,QAAA,SAAS,aAqBpB"}
@@ -1,2 +1,8 @@
1
+ /**
2
+ * returns an array of all distinct values in a field (equality or $in)
3
+ *
4
+ * @param {Any} field the right-hand side of a document field
5
+ * @return {Boolean} array of values for this field
6
+ */
1
7
  export declare const getDistinctValues: (field?: any) => any;
2
8
  //# sourceMappingURL=get-distinct-values.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-distinct-values.d.ts","sourceRoot":"","sources":["../src/get-distinct-values.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB,WAAY,GAAG,QAa5C,CAAC"}
1
+ {"version":3,"file":"get-distinct-values.d.ts","sourceRoot":"","sources":["../src/get-distinct-values.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,WAAY,GAAG,QAa5C,CAAC"}
@@ -2,15 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getDistinctValues = void 0;
4
4
  const lodash_1 = require("lodash");
5
+ /**
6
+ * returns an array of all distinct values in a field (equality or $in)
7
+ *
8
+ * @param {Any} field the right-hand side of a document field
9
+ * @return {Boolean} array of values for this field
10
+ */
5
11
  const getDistinctValues = (field) => {
12
+ // field not present, return empty array
6
13
  if (field === undefined) {
7
14
  return [];
8
15
  }
16
+ // field is object, could be a $in clause or a primitive value
9
17
  if ((0, lodash_1.isPlainObject)(field)) {
10
18
  if ((0, lodash_1.has)(field, '$in')) {
11
19
  return field.$in;
12
20
  }
13
21
  }
22
+ // it is not a $in operator, return single value as array
14
23
  return [field];
15
24
  };
16
25
  exports.getDistinctValues = getDistinctValues;
@@ -1 +1 @@
1
- {"version":3,"file":"get-distinct-values.js","sourceRoot":"","sources":["../src/get-distinct-values.ts"],"names":[],"mappings":";;;AAAA,mCAA4C;AAQrC,MAAM,iBAAiB,GAAG,CAAC,KAAW,EAAE,EAAE;IAE/C,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;IAED,IAAI,IAAA,sBAAa,EAAC,KAAK,CAAC,EAAE;QACxB,IAAI,IAAA,YAAG,EAAC,KAAK,EAAE,KAAK,CAAC,EAAE;YACrB,OAAO,KAAK,CAAC,GAAG,CAAC;SAClB;KACF;IAED,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC,CAAC;AAbW,QAAA,iBAAiB,qBAa5B"}
1
+ {"version":3,"file":"get-distinct-values.js","sourceRoot":"","sources":["../src/get-distinct-values.ts"],"names":[],"mappings":";;;AAAA,mCAA4C;AAE5C;;;;;GAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAW,EAAE,EAAE;IAC/C,wCAAwC;IACxC,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;IACD,8DAA8D;IAC9D,IAAI,IAAA,sBAAa,EAAC,KAAK,CAAC,EAAE;QACxB,IAAI,IAAA,YAAG,EAAC,KAAK,EAAE,KAAK,CAAC,EAAE;YACrB,OAAO,KAAK,CAAC,GAAG,CAAC;SAClB;KACF;IACD,yDAAyD;IACzD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC,CAAC;AAbW,QAAA,iBAAiB,qBAa5B"}
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Determines if a field in the query has a distinct value (equality or $in).
3
+ *
4
+ * @param {Any} field the right-hand side of a document field
5
+ * @param {Any} value the value to check
6
+ * @return {Boolean} whether or not value is included in field
7
+ */
1
8
  export declare const hasDistinctValue: (field: {
2
9
  $in: any;
3
10
  } | undefined, value?: any) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"has-distinct-value.d.ts","sourceRoot":"","sources":["../src/has-distinct-value.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,UACpB;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,GAAG,SAAS,UACvB,GAAG,YAkBZ,CAAC"}
1
+ {"version":3,"file":"has-distinct-value.d.ts","sourceRoot":"","sources":["../src/has-distinct-value.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,UACpB;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,GAAG,SAAS,UACvB,GAAG,YAkBZ,CAAC"}
@@ -3,18 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hasDistinctValue = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const bson_equal_1 = require("./bson-equal");
6
+ /**
7
+ * Determines if a field in the query has a distinct value (equality or $in).
8
+ *
9
+ * @param {Any} field the right-hand side of a document field
10
+ * @param {Any} value the value to check
11
+ * @return {Boolean} whether or not value is included in field
12
+ */
6
13
  const hasDistinctValue = (field, value) => {
14
+ // field not present, add primitive value
7
15
  if (field === undefined) {
8
16
  return false;
9
17
  }
18
+ // field is object, could be a $in clause or a primitive value
10
19
  if ((0, lodash_1.isPlainObject)(field)) {
11
20
  if ((0, lodash_1.has)(field, '$in')) {
21
+ // check if $in array contains the value
12
22
  const inArray = field.$in;
13
23
  return (0, lodash_1.some)(inArray, (other) => {
14
24
  return (0, lodash_1.isEqualWith)(value, other, bson_equal_1.bsonEqual);
15
25
  });
16
26
  }
17
27
  }
28
+ // it is not a $in operator, check value directly
18
29
  return (0, lodash_1.isEqualWith)(field, value, bson_equal_1.bsonEqual);
19
30
  };
20
31
  exports.hasDistinctValue = hasDistinctValue;
@@ -1 +1 @@
1
- {"version":3,"file":"has-distinct-value.js","sourceRoot":"","sources":["../src/has-distinct-value.ts"],"names":[],"mappings":";;;AAAA,mCAA+D;AAC/D,6CAAyC;AASlC,MAAM,gBAAgB,GAAG,CAC9B,KAA+B,EAC/B,KAAW,EACX,EAAE;IAEF,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,IAAA,sBAAa,EAAC,KAAK,CAAC,EAAE;QACxB,IAAI,IAAA,YAAG,EAAC,KAAK,EAAE,KAAK,CAAC,EAAE;YAErB,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC;YAC1B,OAAO,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC7B,OAAO,IAAA,oBAAW,EAAC,KAAK,EAAE,KAAK,EAAE,sBAAS,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;SACJ;KACF;IAED,OAAO,IAAA,oBAAW,EAAC,KAAK,EAAE,KAAK,EAAE,sBAAS,CAAC,CAAC;AAC9C,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
1
+ {"version":3,"file":"has-distinct-value.js","sourceRoot":"","sources":["../src/has-distinct-value.ts"],"names":[],"mappings":";;;AAAA,mCAA+D;AAC/D,6CAAyC;AAEzC;;;;;;GAMG;AACI,MAAM,gBAAgB,GAAG,CAC9B,KAA+B,EAC/B,KAAW,EACX,EAAE;IACF,yCAAyC;IACzC,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IACD,8DAA8D;IAC9D,IAAI,IAAA,sBAAa,EAAC,KAAK,CAAC,EAAE;QACxB,IAAI,IAAA,YAAG,EAAC,KAAK,EAAE,KAAK,CAAC,EAAE;YACrB,wCAAwC;YACxC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC;YAC1B,OAAO,IAAA,aAAI,EAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC7B,OAAO,IAAA,oBAAW,EAAC,KAAK,EAAE,KAAK,EAAE,sBAAS,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;SACJ;KACF;IACD,iDAAiD;IACjD,OAAO,IAAA,oBAAW,EAAC,KAAK,EAAE,KAAK,EAAE,sBAAS,CAAC,CAAC;AAC9C,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
@@ -1,3 +1,25 @@
1
+ /**
2
+ * returns whether a value is fully or partially covered by a range,
3
+ * specified with $gt(e)/$lt(e). Ranges can be open ended on either side,
4
+ * and can also be single equality queries, e.g. {"field": 16}.
5
+ *
6
+ * @examples
7
+ * inValueRange(15, {value: 15, dx: 0}) => 'yes'
8
+ * inValueRange({$gte: 15, $lt: 30}, {value: 20, dx: 5}) => 'yes'
9
+ * inValueRange({$gte: 15, $lt: 30}, {value: 15, dx: 5}) => 'yes'
10
+ * inValueRange(15, {value: 15, dx: 1}) => 'partial'
11
+ * inValueRange({$gt: 15, $lt: 30}, {value: 15, dx: 5}) => 'partial'
12
+ * inValueRange({$gte: 15, $lt: 30}, {value: 20, dx: 20}) => 'partial'
13
+ * inValueRange({$gte: 15, $lt: 30}, {value: 10, dx: 10}) => 'partial'
14
+ * inValueRange({$gte: 15, $lt: 30}, {value: 10, dx: 5}) => 'partial'
15
+ * inValueRange({$gt: 15, $lt: 30}, {value: 10, dx: 5}) => 'no'
16
+ * inValueRange({$gte: 15, $lt: 30}, {value: 10, dx: 4}) => 'no'
17
+ *
18
+ * @param {Object|number} field the field value (range or number)
19
+ * @param {Object} d object with a `value` and `dx` field if
20
+ * the value represents a binned range itself
21
+ * @return {String} 'yes', 'partial', 'no'
22
+ */
1
23
  export declare const inValueRange: (field: any, d: {
2
24
  value: any;
3
25
  dx?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"in-value-range.d.ts","sourceRoot":"","sources":["../src/in-value-range.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,YAAY,UAChB,GAAG,KACP;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,6BAqG3C,CAAC"}
1
+ {"version":3,"file":"in-value-range.d.ts","sourceRoot":"","sources":["../src/in-value-range.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,UAChB,GAAG,KACP;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,6BAqG3C,CAAC"}
@@ -3,6 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inValueRange = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const bson_equal_1 = require("./bson-equal");
6
+ /**
7
+ * returns whether a value is fully or partially covered by a range,
8
+ * specified with $gt(e)/$lt(e). Ranges can be open ended on either side,
9
+ * and can also be single equality queries, e.g. {"field": 16}.
10
+ *
11
+ * @examples
12
+ * inValueRange(15, {value: 15, dx: 0}) => 'yes'
13
+ * inValueRange({$gte: 15, $lt: 30}, {value: 20, dx: 5}) => 'yes'
14
+ * inValueRange({$gte: 15, $lt: 30}, {value: 15, dx: 5}) => 'yes'
15
+ * inValueRange(15, {value: 15, dx: 1}) => 'partial'
16
+ * inValueRange({$gt: 15, $lt: 30}, {value: 15, dx: 5}) => 'partial'
17
+ * inValueRange({$gte: 15, $lt: 30}, {value: 20, dx: 20}) => 'partial'
18
+ * inValueRange({$gte: 15, $lt: 30}, {value: 10, dx: 10}) => 'partial'
19
+ * inValueRange({$gte: 15, $lt: 30}, {value: 10, dx: 5}) => 'partial'
20
+ * inValueRange({$gt: 15, $lt: 30}, {value: 10, dx: 5}) => 'no'
21
+ * inValueRange({$gte: 15, $lt: 30}, {value: 10, dx: 4}) => 'no'
22
+ *
23
+ * @param {Object|number} field the field value (range or number)
24
+ * @param {Object} d object with a `value` and `dx` field if
25
+ * the value represents a binned range itself
26
+ * @return {String} 'yes', 'partial', 'no'
27
+ */
6
28
  const inValueRange = (field, d) => {
7
29
  const compOperators = {
8
30
  $gte: function (a, b) {
@@ -27,6 +49,7 @@ const inValueRange = (field, d) => {
27
49
  const conditions = [];
28
50
  const edgeCase = [];
29
51
  if (!(0, lodash_1.isPlainObject)(field)) {
52
+ // add an equality condition
30
53
  conditions.push(function (a) {
31
54
  return (0, lodash_1.isEqualWith)(a, field, bson_equal_1.bsonEqual);
32
55
  });
@@ -36,14 +59,43 @@ const inValueRange = (field, d) => {
36
59
  (0, lodash_1.forOwn)(field, function (value, key) {
37
60
  const comparator = compOperators[key];
38
61
  if (comparator) {
62
+ // add comparison condition(s), right-curried with the value of the query
39
63
  conditions.push((0, lodash_1.curryRight)(comparator)(value));
40
64
  edgeCase.push(value);
41
65
  }
42
66
  });
43
67
  }
44
68
  const dx = (0, lodash_1.get)(d, 'dx', null);
69
+ // extract bound(s): if a dx value is set, create a 2-element array of
70
+ // upper and lower bound. otherwise create a single value array of the
71
+ // original bson type (if available) or the extracted value.
72
+ // NOTE: this package is a copy of https://github.com/mongodb-js/mongodb-query-util/tree/main.
73
+ // Once we converted the code to typescript, eslint started to complain about the fact
74
+ // that the sum is not happening always between numbers.
75
+ // From tests, it seems expected for d.value to also be a BSON type, and the sum
76
+ // here may not make sense.
77
+ // Potentially there could be bugs deriving from it, but tests are passing and
78
+ // is not easy to tell what is the original intent here, so we suppress the eslint warning.
79
+ //
80
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
45
81
  const bounds = dx ? (0, lodash_1.uniq)([d.value, d.value + dx]) : [d.bson || d.value];
82
+ /*
83
+ * Logic to determine if the query covers the value (or value range)
84
+ *
85
+ * if all bounds pass all conditions, the value is fully covered in the range (yes)
86
+ * if one of two bounds passes all conditions, the value is partially covered (partial)
87
+ * if none of the bounds pass all conditions, the value is not covered (no)
88
+ *
89
+ * Since the upper bound of a bar represents the exclusive bound
90
+ * (i.e. lower <= x < upper) we need to use a little hack to adjust for
91
+ * the math. This means that if someone adjusts the query bound manually by
92
+ * less than 1 millionth of the value, one of the bars may appear half
93
+ * selected instead of not/fully selected. The error is purely visual.
94
+ */
46
95
  const results = (0, lodash_1.map)(bounds, function (bound, i) {
96
+ // adjust the upper bound slightly as it represents an exclusive bound
97
+ // getting this perfectly right would require a lot more code to check for
98
+ // all 4 edge cases.
47
99
  if (i > 0) {
48
100
  bound -= 0.00001 * Math.abs(bound) + 0.00001;
49
101
  }
@@ -57,6 +109,7 @@ const inValueRange = (field, d) => {
57
109
  if ((0, lodash_1.some)(results)) {
58
110
  return 'partial';
59
111
  }
112
+ // check for edge case where range wraps around query on both ends
60
113
  if ((0, lodash_1.every)(edgeCase, function (val) {
61
114
  return val > bounds[0] && val < bounds[bounds.length - 1];
62
115
  })) {
@@ -1 +1 @@
1
- {"version":3,"file":"in-value-range.js","sourceRoot":"","sources":["../src/in-value-range.ts"],"names":[],"mappings":";;;AAAA,mCAUgB;AAEhB,6CAAyC;AAwBlC,MAAM,YAAY,GAAG,CAC1B,KAAU,EACV,CAA0C,EAC1C,EAAE;IACF,MAAM,aAAa,GAAsD;QACvE,IAAI,EAAE,UAAU,CAAS,EAAE,CAAS;YAClC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;QACD,GAAG,EAAE,UAAU,CAAS,EAAE,CAAS;YACjC,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IAAI,EAAE,U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CAAC;AAvGW,QAAA,YAAY,gBAuGvB"}
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "email": "compass@mongodb.com"
14
14
  },
15
15
  "homepage": "https://github.com/mongodb-js/compass",
16
- "version": "2.2.6",
16
+ "version": "2.2.8",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "https://github.com/mongodb-js/compass.git"
@@ -50,10 +50,10 @@
50
50
  "reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
51
51
  },
52
52
  "devDependencies": {
53
- "@mongodb-js/eslint-config-compass": "^1.1.5",
54
- "@mongodb-js/mocha-config-compass": "^1.4.0",
53
+ "@mongodb-js/eslint-config-compass": "^1.1.7",
54
+ "@mongodb-js/mocha-config-compass": "^1.4.2",
55
55
  "@mongodb-js/prettier-config-compass": "^1.0.2",
56
- "@mongodb-js/tsconfig-compass": "^1.0.4",
56
+ "@mongodb-js/tsconfig-compass": "^1.0.5",
57
57
  "@types/chai": "^4.2.21",
58
58
  "@types/mocha": "^9.0.0",
59
59
  "@types/sinon-chai": "^3.2.5",
@@ -71,5 +71,5 @@
71
71
  "bson": "^6.7.0",
72
72
  "lodash": "^4.17.21"
73
73
  },
74
- "gitHead": "36ab9850539afa17c602487d440cdfa07bade181"
74
+ "gitHead": "7bb0ec47c90909273d5cf0a63a39f12fc31e8d42"
75
75
  }