Browse Source

Refs #1002. Changed refs from Bson to Json.

http://source.rd.rcg.local/trac/eagle6/changeset/1327/Eagle6_SVN
Spencer Rathbun 12 years ago
parent
commit
c38b286961

+ 12 - 12
lib/pipeline/documentSources/DocumentSource.js

@@ -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");
     };
     

+ 2 - 2
lib/pipeline/documentSources/FilterBaseDocumentSource.js

@@ -102,7 +102,7 @@ var FilterBaseDocumentSource = module.exports = (function(){
 	};
 
 	/**
-	* Create a BSONObj suitable for Matcher construction.
+	* Create a JSONObj suitable for Matcher construction.
 	*
 	* This is used after filter analysis has moved as many filters to
 	* as early a point as possible in the document processing pipeline.
@@ -112,7 +112,7 @@ var FilterBaseDocumentSource = module.exports = (function(){
 	*
 	* @param pBuilder the builder to write to
 	**/
-	proto.toMatcherBson = function toMatcherBson(pBuilder) {
+	proto.toMatcherJson = function toMatcherJson(pBuilder) {
 		throw new Error("not implemented");
 	};
 

+ 5 - 5
test/lib/pipeline/documentSources/FilterBaseDocumentSource.js

@@ -28,21 +28,21 @@ module.exports = {
 
 		"#accept()": {
 
-			"should throw Error when calling toMatcherBson": function testConstructor(){
+			"should throw Error when calling toMatcherJson": function testConstructor(){
 				assert.throws(function(){
 					var fbds = new FilterBaseDocumentSource();
-					fbds.toMatcherBson();
+					fbds.toMatcherJson();
 				});
 			}
 
 		},
 
-		"#toMatcherBson()": {
+		"#toMatcherJson()": {
 
-			"should throw Error when calling toMatcherBson": function testConstructor(){
+			"should throw Error when calling toMatcherJson": function testConstructor(){
 				assert.throws(function(){
 					var fbds = new FilterBaseDocumentSource();
-					fbds.toMatcherBson();
+					fbds.toMatcherJson();
 				});
 			}