mongodb-explain-compat 3.0.0 → 3.0.2
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/lib/index.js +7 -5
- package/package.json +7 -5
package/lib/index.js
CHANGED
|
@@ -175,7 +175,7 @@ function mapShardedFind(explain) {
|
|
|
175
175
|
}
|
|
176
176
|
queryPlanner.winningPlan.shards.forEach((shard, index) => {
|
|
177
177
|
const winningPlan = shard.winningPlan.queryPlan;
|
|
178
|
-
if (winningPlan) {
|
|
178
|
+
if (winningPlan && executionStats) {
|
|
179
179
|
const executionStages = mapStages(
|
|
180
180
|
winningPlan,
|
|
181
181
|
executionStats.executionStages.shards[index].executionStages
|
|
@@ -204,10 +204,12 @@ function _mapPlannerStage(planner) {
|
|
|
204
204
|
const winningPlan = planner.queryPlanner.winningPlan.queryPlan;
|
|
205
205
|
planner.queryPlanner.winningPlan = winningPlan;
|
|
206
206
|
|
|
207
|
-
planner.executionStats
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
if (planner.executionStats) {
|
|
208
|
+
planner.executionStats.executionStages = mapStages(
|
|
209
|
+
winningPlan,
|
|
210
|
+
planner.executionStats.executionStages
|
|
211
|
+
);
|
|
212
|
+
}
|
|
211
213
|
}
|
|
212
214
|
return planner;
|
|
213
215
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb-explain-compat",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Convert mongodb SBE explain output to 4.4 explain output",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mongodb",
|
|
@@ -25,12 +25,14 @@
|
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
27
|
"lint": "eslint **/*.js",
|
|
28
|
-
"test": "npm run
|
|
28
|
+
"test": "npm run compile && nyc mocha --colors test/*.js",
|
|
29
29
|
"compile": "gen-esm-wrapper . ./.esm-wrapper.mjs",
|
|
30
30
|
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
|
|
31
31
|
"test-ci": "npm run test",
|
|
32
32
|
"depcheck": "depcheck",
|
|
33
|
-
"bootstrap": "npm run compile"
|
|
33
|
+
"bootstrap": "npm run compile",
|
|
34
|
+
"check": "npm run lint && npm run depcheck",
|
|
35
|
+
"check-ci": "npm run check"
|
|
34
36
|
},
|
|
35
37
|
"homepage": "https://github.com/mongodb-js/compass",
|
|
36
38
|
"repository": {
|
|
@@ -51,8 +53,8 @@
|
|
|
51
53
|
"eslint-plugin-promise": "^4.2.1",
|
|
52
54
|
"eslint-plugin-standard": "^4.0.1",
|
|
53
55
|
"gen-esm-wrapper": "^1.1.0",
|
|
54
|
-
"mocha": "^
|
|
56
|
+
"mocha": "^10.2.0",
|
|
55
57
|
"nyc": "^15.1.0"
|
|
56
58
|
},
|
|
57
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ab322a183cd516c117cf575d9b7931073954fe1d"
|
|
58
60
|
}
|