1679 lines
25 KiB
HTML
Executable File
1679 lines
25 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>DocStrap Class: queryOperators</title>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
|
|
|
<link type="text/css" rel="stylesheet" href="styles/site.journal.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container-fluid">
|
|
<div class="navbar navbar-fixed-top navbar-inverse">
|
|
<div class="navbar-inner">
|
|
<a class="brand" href="index.html">DocStrap</a>
|
|
<ul class="nav">
|
|
|
|
<li class="dropdown">
|
|
<a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li>
|
|
<a href="module-base.html">base</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="chains_.html">base/chains</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="binder.html">documents/binder</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="model_.html">documents/model</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="probe.html">documents/probe</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="schema_.html">documents/schema</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="collector.html">ink/collector</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="bussable_.html">mixins/bussable</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="signalable_.html">mixins/signalable</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="format.html">strings/format</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="logger.html">utils/logger</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li>
|
|
<a href="base.html">base</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="chains.html">base/chains</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="model.html">documents/model</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="probe.queryOperators.html">documents/probe.queryOperators</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="probe.updateOperators.html">documents/probe.updateOperators</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="collector-ACollector.html">ink/collector~ACollector</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="collector-CollectorBase_.html">ink/collector~CollectorBase</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="collector-OCollector.html">ink/collector~OCollector</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="signalable-Signal.html">mixins/signalable~Signal</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="logger.Logger.html">utils/logger.Logger</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="mixins.list.html" class="dropdown-toggle" data-toggle="dropdown">Mixins<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li>
|
|
<a href="schema.html">documents/schema</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="bussable.html">mixins/bussable</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="signalable.html">mixins/signalable</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="tutorials.list.html" class="dropdown-toggle" data-toggle="dropdown">Tutorials<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li>
|
|
<a href="tutorial-Teeth.html">Brush Teeth</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="tutorial-Car.html">Drive Car</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="tutorial-Test.html">Fence Test</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
|
|
class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu ">
|
|
|
|
<li>
|
|
<a href="global.html#utils/logger">utils/logger</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
|
|
|
|
<div class="span8">
|
|
|
|
<div id="main">
|
|
|
|
|
|
|
|
<h1 class="page-title">Class: queryOperators</h1>
|
|
<section>
|
|
|
|
<header>
|
|
<h2>
|
|
<span class="ancestors"><a href="probe.html">documents/probe</a>.</span>
|
|
|
|
queryOperators
|
|
</h2>
|
|
|
|
<div class="class-description"><p>This is not actually a class, but an artifact of the documentation system</p></div>
|
|
|
|
</header>
|
|
|
|
<article>
|
|
<div class="container-overview">
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name" id="queryOperators"><span class="type-signature"></span>new queryOperators<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
<div class="description">
|
|
<p>These are the supported query operators</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-999">line 999</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="subsection-title">Members</h3>
|
|
|
|
<dl>
|
|
|
|
<dt class="name" id="$all">
|
|
<h4><span class="type-signature"><static> </span>$all<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$all</code> checks to see if all of the members of the query are included in an array
|
|
<code>{array: {$all: [val1, val2, val3]}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-389">line 389</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"categories" : {$all : ["cat4", "cat2", "cat1"]}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$and">
|
|
<h4><span class="type-signature"><static> </span>$and<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Returns true if all of the conditions of the query are met
|
|
<code>{$and: [query1, query2, query3]}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-579">line 579</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {$and : [
|
|
{"name.first" : "Mildred"},
|
|
{"name.last" : "Graves"}
|
|
]} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$elemMatch">
|
|
<h4><span class="type-signature"><static> </span>$elemMatch<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>This is like $all except that it works with an array of objects or value. It checks to see the array matches all
|
|
of the conditions of the query
|
|
<code>{array: {$elemMatch: {path: value, path: {$operation: value2}}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-552">line 552</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {attr : {$elemMatch : [
|
|
{color : "red", "hand" : "left"}
|
|
]}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$eq">
|
|
<h4><span class="type-signature"><static> </span>$eq<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$eq</code> performs a <code>===</code> comparison by comparing the value directly if it is an atomic value.
|
|
otherwise if it is an array, it checks to see if the value looked for is in the array.
|
|
<code>{field: value}</code> or <code>{field: {$eq : value}}</code> or <code>{array: value}</code> or <code>{array: {$eq : value}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-347">line 347</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {categories : "cat1"} );
|
|
// is the same as
|
|
probe.find( data, {categories : {$eq: "cat1"}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$exists">
|
|
<h4><span class="type-signature"><static> </span>$exists<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$exists</code> Sees if a field exists.
|
|
<code>{field: {$exists: true|false}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-493">line 493</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"name.middle" : {$exists : true}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$gt">
|
|
<h4><span class="type-signature"><static> </span>$gt<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$gt</code> Sees if a field is greater than the value
|
|
<code>{field: {$gt: value}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-409">line 409</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$gt : 24}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$gte">
|
|
<h4><span class="type-signature"><static> </span>$gte<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$gte</code> Sees if a field is greater than or equal to the value
|
|
<code>{field: {$gte: value}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-422">line 422</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$gte : 50}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$in">
|
|
<h4><span class="type-signature"><static> </span>$in<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$in</code> Sees if a field has one of the values in the query
|
|
<code>{field: {$in: [test1, test2, test3,...]}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-461">line 461</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$in : [24, 28, 60]}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$lt">
|
|
<h4><span class="type-signature"><static> </span>$lt<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$lt</code> Sees if a field is less than the value
|
|
<code>{field: {$lt: value}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-435">line 435</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$lt : 24}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$lte">
|
|
<h4><span class="type-signature"><static> </span>$lte<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$lte</code> Sees if a field is less than or equal to the value
|
|
<code>{field: {$lte: value}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-448">line 448</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$lte : 50}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$mod">
|
|
<h4><span class="type-signature"><static> </span>$mod<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Checks equality to a modulus operation on a field
|
|
<code>{field: {$mod: [divisor, remainder]}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-506">line 506</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$mod : [2, 0]}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$ne">
|
|
<h4><span class="type-signature"><static> </span>$ne<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$ne</code> performs a <code>!==</code> comparison by comparing the value directly if it is an atomic value. Otherwise, if it is an array
|
|
this is performs a "not in array".
|
|
'{field: {$ne : value}}<code>or '{array: {$ne : value}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-369">line 369</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"name.first" : {$ne : "Sheryl"}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$nin">
|
|
<h4><span class="type-signature"><static> </span>$nin<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p><code>$nin</code> Sees if a field has none of the values in the query
|
|
<code>{field: {$nin: [test1, test2, test3,...]}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-477">line 477</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"age" : {$nin : [24, 28, 60]}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$nor">
|
|
<h4><span class="type-signature"><static> </span>$nor<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Returns true if none of the conditions of the query are met
|
|
<code>{$nor: [query1, query2, query3]}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-635">line 635</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {$nor : [
|
|
{"age" : {$in : [24, 28, 60]}},
|
|
{categories : "cat1"}
|
|
]} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$not">
|
|
<h4><span class="type-signature"><static> </span>$not<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Logical NOT on the conditions of the query
|
|
<code>{$not: [query1, query2, query3]}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-662">line 662</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {$not : {"age" : {$lt : 24}}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$or">
|
|
<h4><span class="type-signature"><static> </span>$or<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Returns true if any of the conditions of the query are met
|
|
<code>{$or: [query1, query2, query3]}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-608">line 608</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {$or : [
|
|
"age" : {$in : [24, 28, 60]}},
|
|
{categories : "cat1"}
|
|
]} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$regex">
|
|
<h4><span class="type-signature"><static> </span>$regex<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Performs a regular expression test againts the field
|
|
<code>{field: {$regex: re, $options: reOptions}}</code></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-538">line 538</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {"name.first" : {$regex : "m*", $options : "i"}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt class="name" id="$size">
|
|
<h4><span class="type-signature"><static> </span>$size<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<div class="description">
|
|
<p>Compares the size of the field/array to the query. This can be used on arrays, strings and objects (where it will count keys)
|
|
<code>{'field|array</code>: {$size: value}}`</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source:</dt>
|
|
<dd class="tag-source">
|
|
<ul class="dummy">
|
|
<li>
|
|
<a href="probe.js.html">documents/probe.js</a>,
|
|
<a href="probe.js.html#sunlight-1-line-525">line 525</a>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h5>Example</h5>
|
|
|
|
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
|
|
probe.find( data, {attr : {$size : 3}} );</pre>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
<footer>
|
|
|
|
|
|
<span class="copyright">
|
|
DocStrap Copyright © 2012-2013 The contributors to the JSDoc3 and DocStrap projects.
|
|
</span>
|
|
<br />
|
|
|
|
<span class="jsdoc-message">
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a>
|
|
on Mon Jul 7th 2014 using the <a
|
|
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
|
</span>
|
|
</footer>
|
|
</div>
|
|
|
|
|
|
<div class="span3">
|
|
<div id="toc"></div>
|
|
</div>
|
|
|
|
<br clear="both">
|
|
</div>
|
|
|
|
</div>
|
|
<!--<script src="scripts/sunlight.js"></script>-->
|
|
<script src="scripts/docstrap.lib.js"></script>
|
|
<script src="scripts/bootstrap-dropdown.js"></script>
|
|
<script src="scripts/toc.js"></script>
|
|
|
|
<script>
|
|
$( function () {
|
|
$( "[id*='$']" ).each( function () {
|
|
var $this = $( this );
|
|
|
|
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
|
} );
|
|
|
|
$( "#toc" ).toc( {
|
|
anchorName : function ( i, heading, prefix ) {
|
|
return $( heading ).attr( "id" ) || ( prefix + i );
|
|
},
|
|
selectors : "h1,h2,h3,h4",
|
|
showAndHide : false,
|
|
scrollTo : "100px"
|
|
} );
|
|
|
|
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
|
|
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
|
$( '.dropdown-toggle' ).dropdown();
|
|
// $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
|
|
|
|
$( ".tutorial-section pre, .readme-section pre" ).each( function () {
|
|
var $this = $( this );
|
|
|
|
var example = $this.find( "code" );
|
|
exampleText = example.html();
|
|
var lang = /{@lang (.*?)}/.exec( exampleText );
|
|
if ( lang && lang[1] ) {
|
|
exampleText = exampleText.replace( lang[0], "" );
|
|
example.html( exampleText );
|
|
lang = lang[1];
|
|
} else {
|
|
lang = "javascript";
|
|
}
|
|
|
|
if ( lang ) {
|
|
|
|
$this
|
|
.addClass( "sunlight-highlight-" + lang )
|
|
.addClass( "linenums" )
|
|
.html( example.html() );
|
|
|
|
}
|
|
} );
|
|
|
|
Sunlight.highlightAll( {
|
|
lineNumbers : true,
|
|
showMenu : true,
|
|
enableDoclinks : true
|
|
} );
|
|
} );
|
|
</script>
|
|
|
|
|
|
|
|
<!--Navigation and Symbol Display-->
|
|
|
|
|
|
|
|
<!--Google Analytics-->
|
|
|
|
|
|
</body>
|
|
</html> |