|
@@ -29,7 +29,7 @@ var DocumentSource = module.exports = (function(){
|
|
|
|
|
|
/*
|
|
|
for explain: # of rows returned by this source
|
|
|
- This is *not* unsigned so it can be passed to BSONObjBuilder.append().
|
|
|
+ This is *not* unsigned so it can be passed to JSONObjBuilder.append().
|
|
|
*/
|
|
|
this.nRowsOut = 0;
|
|
|
|
|
@@ -201,7 +201,7 @@ public:
|
|
|
*
|
|
|
* @method depsToProjection
|
|
|
* @param {Object} deps set (unique array) of strings
|
|
|
- * @returns {Object} BSONObj
|
|
|
+ * @returns {Object} JSONObj
|
|
|
**/
|
|
|
klass.depsToProjection = function depsToProjection(deps) {
|
|
|
var bb = {};
|
|
@@ -227,30 +227,30 @@ public:
|
|
|
|
|
|
/**
|
|
|
* Add the DocumentSource to the array builder.
|
|
|
- * The default implementation calls sourceToBson() in order to
|
|
|
+ * The default implementation calls sourceToJson() in order to
|
|
|
* convert the inner part of the object which will be added to the
|
|
|
* array being built here.
|
|
|
*
|
|
|
- * @method addToBsonArray
|
|
|
- * @param {Array} pBuilder BSONArrayBuilder: the array builder to add the operation to.
|
|
|
+ * @method addToJsonArray
|
|
|
+ * @param {Array} pBuilder JSONArrayBuilder: the array builder to add the operation to.
|
|
|
* @param {Boolean} explain create explain output
|
|
|
* @returns {Object}
|
|
|
**/
|
|
|
- proto.addToBsonArray = function addToBsonArray(pBuilder, explain) {
|
|
|
- pBuilder.push(this.sourceToBson({}, explain));
|
|
|
+ proto.addToJsonArray = function addToJsonArray(pBuilder, explain) {
|
|
|
+ pBuilder.push(this.sourceToJson({}, explain));
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Create an object that represents the document source. The object
|
|
|
* will have a single field whose name is the source's name. This
|
|
|
- * will be used by the default implementation of addToBsonArray()
|
|
|
- * to add this object to a pipeline being represented in BSON.
|
|
|
+ * will be used by the default implementation of addToJsonArray()
|
|
|
+ * to add this object to a pipeline being represented in JSON.
|
|
|
*
|
|
|
- * @method sourceToBson
|
|
|
- * @param {Object} pBuilder BSONObjBuilder: a blank object builder to write to
|
|
|
+ * @method sourceToJson
|
|
|
+ * @param {Object} pBuilder JSONObjBuilder: a blank object builder to write to
|
|
|
* @param {Boolean} explain create explain output
|
|
|
**/
|
|
|
- proto.sourceToBson = function sourceToBson(pBuilder, explain) {
|
|
|
+ proto.sourceToJson = function sourceToJson(pBuilder, explain) {
|
|
|
throw new Error("not implemented");
|
|
|
};
|
|
|
|