|
|
@@ -1,8 +1,9 @@
|
|
|
"use strict";
|
|
|
|
|
|
-var LeafMatchExpression = require('./LeafMatchExpression');
|
|
|
+var LeafMatchExpression = require('./LeafMatchExpression');
|
|
|
var Value = require('../Value');
|
|
|
|
|
|
+
|
|
|
// Autogenerated by cport.py on 2013-09-17 14:37
|
|
|
var ComparisonMatchExpression = module.exports = function ComparisonMatchExpression( type ){
|
|
|
this._matchType = type;
|
|
|
@@ -140,8 +141,8 @@ proto.matchesSingleElement = function matchesSingleElement( e ){ // const BSONE
|
|
|
if ((e === null || e === undefined) && (this._rhs ===null || this._rhs === undefined)) {
|
|
|
return ["EQ","LTE","GTE"].indexOf(this._matchType) != -1;
|
|
|
}
|
|
|
-
|
|
|
- if (this._rhs instanceof MaxKey || this._rhs instanceof MinKey) {
|
|
|
+
|
|
|
+ if (this._rhs.constructor.name in ['MaxKey','MinKey'] ) {
|
|
|
return this._matchType != "EQ";
|
|
|
}
|
|
|
return false;
|