|
|
@@ -6,6 +6,8 @@ var Value = require('../Value');
|
|
|
var ArrayFilterEntries = module.exports = function ArrayFilterEntries(){
|
|
|
this._hasNull = false;
|
|
|
this._hasEmptyArray = false;
|
|
|
+ this._equalities = [];
|
|
|
+ this._regexes = [];
|
|
|
}, klass = ArrayFilterEntries, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
|
|
|
|
|
|
@@ -42,8 +44,8 @@ proto._regexes = undefined;
|
|
|
*/
|
|
|
proto.addEquality = function addEquality( e ) {
|
|
|
//File expression_leaf.cpp lines 369-387
|
|
|
-
|
|
|
- if(Object.keys(e)[0][0] === '$'){
|
|
|
+
|
|
|
+ if(e instanceof Object && Object.keys(e)[0][0] === '$'){
|
|
|
return {'code':'BAD_VALUE', 'desc':'cannot next $ under $in'};
|
|
|
}
|
|
|
|
|
|
@@ -58,14 +60,14 @@ proto.addEquality = function addEquality( e ) {
|
|
|
if (e instanceof Array && e.length === 0) {
|
|
|
this._hasEmptyArray = true;
|
|
|
}
|
|
|
-
|
|
|
- this._equalities.insert( e );
|
|
|
+
|
|
|
+ this._equalities.push( e );
|
|
|
return {'code':'OK'};
|
|
|
};
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method addRegex
|
|
|
* @param
|
|
|
@@ -79,7 +81,7 @@ proto.addRegex = function addRegex( expr ) { // RegexMatchExpression* expr
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method contains
|
|
|
* @param
|
|
|
@@ -97,7 +99,7 @@ proto.contains = function contains( elem ) { // const BSONElement& elem
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method copyTo
|
|
|
* @param
|
|
|
@@ -113,7 +115,7 @@ proto.copyTo = function copyTo( toFillIn ) { // ArrayFilterEntries& toFillIn
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method equalities
|
|
|
* @param
|
|
|
@@ -126,7 +128,7 @@ proto.equalities = function equalities( /* */ ){
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method equivalent
|
|
|
* @param
|
|
|
@@ -147,7 +149,7 @@ proto.equivalent = function equivalent( other ) { // const ArrayFilterEntries&
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method hasEmptyArray
|
|
|
* @param
|
|
|
@@ -160,7 +162,7 @@ proto.hasEmptyArray = function hasEmptyArray( /* */ ){
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method hasNull
|
|
|
* @param
|
|
|
@@ -173,7 +175,7 @@ proto.hasNull = function hasNull( /* */ ){
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method numRegexes
|
|
|
* @param
|
|
|
@@ -186,7 +188,7 @@ proto.numRegexes = function numRegexes( /* */ ){
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method regex
|
|
|
* @param
|
|
|
@@ -199,7 +201,7 @@ proto.regex = function regex( idx ) { // int idx
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method singleNull
|
|
|
* @param
|
|
|
@@ -212,7 +214,7 @@ proto.singleNull = function singleNull( /* */ ){
|
|
|
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
+ *
|
|
|
* This documentation was automatically generated. Please update when you touch this function.
|
|
|
* @method size
|
|
|
* @param
|