"use strict"; var LeafMatchExpression = require('./LeafMatchExpression'); // Autogenerated by cport.py on 2013-09-17 14:37 var ExistsMatchExpression = module.exports = function ExistsMatchExpression(){ base.call(this); this._matchType = 'EXISTS'; }, klass = ExistsMatchExpression, base = LeafMatchExpression, proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}}); /** * * This documentation was automatically generated. Please update when you touch this function. * @method debugString * @param * */ proto.debugString = function debugString( level ) { // StringBuilder& debug, int level // File: expression_leaf.cpp lines: 286-294 return this._debugAddSpace( level ) + this.path() + " exists" + (this.getTag() ? " " + this.getTag().debugString() : "") + "\n"; }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method equivalent * @param * */ proto.equivalent = function equivalent( other ) { // const MatchExpression* other // File: expression_leaf.cpp lines: 297-302 if(this._matchType != other._matchType) { return false; } return this.path() == other.path(); }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method init * @param * */ proto.init = function init( path ) { // const StringData& path // File: expression_leaf.cpp lines: 278-279 return this.initPath( path ); }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method matchesSingleElement * @param * */ proto.matchesSingleElement = function matchesSingleElement( e ) { // const BSONElement& e // File: expression_leaf.cpp lines: 282-283 if(typeof(e) == 'undefined') return false; return !(typeof(e) == 'object') || Object.keys(e).length > 0; }; /** * * This documentation was automatically generated. Please update when you touch this function. * @method shallowClone * @param * */ proto.shallowClone = function shallowClone( /* */ ){ // File: expression_leaf.h lines: 220-223 var e = new ExistsMatchExpression(); e.init(this.path()); return e; };