|
|
@@ -2,14 +2,14 @@
|
|
|
|
|
|
/**
|
|
|
* This class is an implementation of the base class for runners used in MongoDB
|
|
|
- *
|
|
|
+ *
|
|
|
* Note that a lot of stuff here is not used by our code yet. Check the existing implementations
|
|
|
* for what we currently use
|
|
|
- *
|
|
|
+ *
|
|
|
**/
|
|
|
var klass = module.exports = function Runner(){
|
|
|
-
|
|
|
-}, base = Object, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
+
|
|
|
+}, proto = klass.prototype;
|
|
|
|
|
|
klass.RunnerState = {
|
|
|
// We successfully populated the out parameter.
|
|
|
@@ -70,12 +70,12 @@ klass.YieldPolicy = {
|
|
|
|
|
|
/**
|
|
|
* Set the yielding policy of the underlying runner. See the RunnerYieldPolicy enum above.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method setYieldPolicy
|
|
|
* @param [policy]
|
|
|
*/
|
|
|
proto.setYieldPolicy = function setYieldPolicy(policy) {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -108,23 +108,23 @@ proto.setYieldPolicy = function setYieldPolicy(policy) {
|
|
|
* to a loggable format.
|
|
|
*
|
|
|
* objOut will be unowned if it's the result of a fetch or a collection scan.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method getNext
|
|
|
* @param [callback] {Function}
|
|
|
*/
|
|
|
proto.getNext = function getNext(callback) {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Will the next call to getNext() return EOF? It's useful to know if the runner is done
|
|
|
* without having to take responsibility for a result.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method isEOF
|
|
|
*/
|
|
|
proto.isEOF = function isEOF(){
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -135,13 +135,13 @@ proto.isEOF = function isEOF(){
|
|
|
* Called from CollectionCursorCache::invalidateDocument.
|
|
|
*
|
|
|
* See db/invalidation_type.h for InvalidationType.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method invalidate
|
|
|
* @param [dl]
|
|
|
* @param [type]
|
|
|
*/
|
|
|
proto.invalidate = function invalidate(dl, type) {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -151,72 +151,72 @@ proto.invalidate = function invalidate(dl, type) {
|
|
|
*
|
|
|
* The runner must guarantee as a postcondition that future calls to collection() will
|
|
|
* return NULL.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method kill
|
|
|
*/
|
|
|
proto.kill = function kill() {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Save any state required to yield.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method saveState
|
|
|
*/
|
|
|
proto.saveState = function saveState() {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Restore saved state, possibly after a yield. Return true if the runner is OK, false if
|
|
|
* it was killed.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method restoreState
|
|
|
*/
|
|
|
proto.restoreState = function restoreState() {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Return the NS that the query is running over.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method ns
|
|
|
*/
|
|
|
proto.ns = function ns() {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Return the Collection that the query is running over.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method collection
|
|
|
*/
|
|
|
proto.collection = function collection() {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
- * Returns OK, allocating and filling '*explain' or '*planInfo' with a description of the
|
|
|
+ * Returns OK, allocating and filling "*explain" or "*planInfo" with a description of the
|
|
|
* chosen plan, depending on which is non-NULL (one of the two should be NULL). Caller
|
|
|
- * takes onwership of either '*explain' and '*planInfo'. Otherwise, returns false
|
|
|
+ * takes onwership of either "*explain" and "*planInfo". Otherwise, returns false
|
|
|
* a detailed error status.
|
|
|
*
|
|
|
- * If 'explain' is NULL, then this out-parameter is ignored. Similarly, if 'staticInfo'
|
|
|
+ * If "explain" is NULL, then this out-parameter is ignored. Similarly, if "staticInfo"
|
|
|
* is NULL, then no static debug information is produced.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method getInfo
|
|
|
* @param [explain]
|
|
|
* @param [planInfo]
|
|
|
*/
|
|
|
proto.getInfo = function getInfo(explain, planInfo) {
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* dispose of the Runner.
|
|
|
- *
|
|
|
+ *
|
|
|
* @method reset
|
|
|
*/
|
|
|
proto.reset = function reset(){
|
|
|
- throw new Error('Not implemented');
|
|
|
+ throw new Error("Not implemented");
|
|
|
};
|