mongodb-explain-plan-model
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -27,2 +27,8 @@ var Model = require('ampersand-model'); | ||
}, | ||
session: { | ||
initialized: { | ||
type: 'boolean', | ||
default: false | ||
} | ||
}, | ||
derived: { | ||
@@ -148,2 +154,3 @@ usedIndex: { | ||
result.rawExplainObject = JSON.parse(JSON.stringify(attrs)); | ||
result.initialized = true; | ||
return result; | ||
@@ -150,0 +157,0 @@ }, |
@@ -13,6 +13,12 @@ var each = require('lodash.foreach'); | ||
_getStageIterator: function(root) { | ||
root = root || this.rawExplainObject.executionStats.executionStages; | ||
var model = this; | ||
var stage; | ||
var model = this; | ||
var stageStack = [root]; | ||
var stageStack; | ||
if (this.initialized) { | ||
root = root || this.rawExplainObject.executionStats.executionStages; | ||
stageStack = [root]; | ||
} else { | ||
stageStack = []; | ||
} | ||
var iterator = { | ||
@@ -19,0 +25,0 @@ current: function() { |
{ | ||
"name": "mongodb-explain-plan-model", | ||
"description": "Ampersand model abstraction for MongoDB explain plans (3.0+)", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "fmt": "mongodb-js-fmt", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22386
240