Przeglądaj źródła

EAGLESIX-3015: Rename Matcher.js to Matcher2.js... targeted wrong version of mongo

Jason Walton 11 lat temu
rodzic
commit
7c3a878ad1

+ 5 - 5
lib/pipeline/matcher/Matcher.js → lib/pipeline/matcher/Matcher2.js

@@ -1,20 +1,20 @@
 "use strict";
 
 /**
- * Matcher is a simple wrapper around a JSONObj and the MatchExpression created from it.
- * @class Matcher
- * @namespace mungedb-aggregate.pipeline.matcher
+ * Matcher2 is a simple wrapper around a JSONObj and the MatchExpression created from it.
+ * @class Matcher2
+ * @namespace mungedb-aggregate.pipeline.matcher2
  * @module mungedb-aggregate
  * @constructor
  */
-var Matcher = module.exports = function Matcher(pattern, whereCallback){
+var Matcher2 = module.exports = function Matcher2(pattern, nested){
 	this._pattern = pattern;
 	this.parser = new MatchExpressionParser();
 	var result = this.parser.parse(pattern);
 	if (result.code != ErrorCodes.OK)
 		return {code:16810, description:"bad query: " + result};
 	this._expression = result.result;
-}, klass = Matcher, base = Object, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
+}, klass = Matcher2, base = Object, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
 
 // DEPENDENCIES
 var errors = require("../../Errors.js"),

+ 9 - 0
test/lib/pipeline/matcher/Matcher2.js

@@ -0,0 +1,9 @@
+Matcher = require("../../../../lib/pipeline/matcher/Matcher.js");
+
+module.exports = {
+	"Matcher": {
+		"Constructor": function() {
+			var m = new Matcher();
+		}
+	}
+}