| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- "use strict";
- var ArrayMatchingMatchExpression = require('./ArrayMatchingMatchExpression.js');
- // Autogenerated by cport.py on 2013-09-17 14:37
- var ElemMatchObjectMatchExpression = module.exports = function (ELEM_MATCH_OBJECT){
- base.call(this);
- }, klass = ElemMatchObjectMatchExpression, base = ArrayMatchingMatchExpression, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
- // File: expression_array.h lines: 77-77
- proto._sub = undefined;
- /**
- *
- * This documentation was automatically generated. Please update when you touch this function.
- * @method debugString
- * @param
- *
- */
- proto.debugString = function debugString(level){
- // File: expression_array.cpp lines: 106-109
- var debug = this._debugAddSpace(level);
- debug = debug + this.path() + " $elemMatch\n";
- return debug + this._sub.debugString(level + 1);
- };
- /**
- *
- * This documentation was automatically generated. Please update when you touch this function.
- * @method getChild
- * @param
- *
- */
- proto.getChild = function getChild(i){
- // File: expression_array.h lines: 74-73
- return this._sub.get();
- };
- /**
- *
- * This documentation was automatically generated. Please update when you touch this function.
- * @method init
- * @param
- *
- */
- proto.init = function init(path, sub){
- // File: expression_array.cpp lines: 85-87
- this._sub.reset(sub);
- return this.initPath(path);
- };
- /**
- *
- * This documentation was automatically generated. Please update when you touch this function.
- * @method matchesArray
- * @param
- *
- */
- proto.matchesArray = function matchesArray(anArray, details){
- // File: expression_array.cpp lines: 90-103
- for (var i in anArray) {
- var inner = anArray[i];
- if (!(inner instanceof Object))
- continue;
- if (this._sub.matchesBSON(inner, null)) {
- if (details && details.needRecord()) {
- details.setElemMatchKey(inner.fieldName());
- }
- return true;
- }
- }
- return false;
- };
- /**
- *
- * This documentation was automatically generated. Please update when you touch this function.
- * @method numChildren
- * @param
- *
- */
- proto.numChildren = function numChildren(){
- // File: expression_array.h lines: 73-72
- return 1;
- };
- /**
- *
- * This documentation was automatically generated. Please update when you touch this function.
- * @method shallowClone
- * @param
- *
- */
- proto.shallowClone = function shallowClone(){
- // File: expression_array.h lines: 65-68
- var element = new ElemMatchObjectMatchExpression();
- element.init(this.path(), this._sub.shallowClone());
- return element;
- };
|