jsdoc-oblivion
Version:
A gray and blue theme for JSDoc.
737 lines (305 loc) • 12.6 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=yes, width=device-width">
<title>Oblivion — Class: updateOperators</title>
<link rel="shortcut icon" href="/favicon.ico">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.dark.css">
<link type="text/css" rel="stylesheet" href="styles/site.oblivion.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">Oblivion</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="module-base_chains.html">base/chains</a>
</li>
<li>
<a href="module-documents_binder.html">documents/binder</a>
</li>
<li>
<a href="module-documents_model.html">documents/model</a>
</li>
<li>
<a href="module-documents_probe.html">documents/probe</a>
</li>
<li>
<a href="module-documents_schema.html">documents/schema</a>
</li>
<li>
<a href="module-ink_collector.html">ink/collector</a>
</li>
<li>
<a href="module-mixins_bussable.html">mixins/bussable</a>
</li>
<li>
<a href="module-mixins_signalable.html">mixins/signalable</a>
</li>
<li>
<a href="module-strings_format.html">strings/format</a>
</li>
<li>
<a href="module-utils_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="base_chains.html">base/chains</a>
</li>
<li>
<a href="documents_model.html">documents/model</a>
</li>
<li>
<a href="module-documents_probe.queryOperators.html">documents/probe.queryOperators</a>
</li>
<li>
<a href="module-documents_probe.updateOperators.html">documents/probe.updateOperators</a>
</li>
<li>
<a href="module-ink_collector-ACollector.html">ink/collector~ACollector</a>
</li>
<li>
<a href="module-ink_collector-CollectorBase.html">ink/collector~CollectorBase</a>
</li>
<li>
<a href="module-ink_collector-OCollector.html">ink/collector~OCollector</a>
</li>
<li>
<a href="module-mixins_signalable-Signal.html">mixins/signalable~Signal</a>
</li>
<li>
<a href="utils_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="documents_schema.html">documents/schema</a>
</li>
<li>
<a href="mixins_bussable.html">mixins/bussable</a>
</li>
<li>
<a href="mixins_signalable.html">mixins/signalable</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span3">
<div id="toc"></div>
</div>
<div class="span9">
<div id="main">
<h1 class="page-title">Class: updateOperators</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="module-documents_probe.html">documents/probe</a>.</span>
updateOperators
</h2>
<div class="class-description">This is not actually a class, but an artifact of the documentation system</div>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="updateOperators"><span class="type-signature"></span>new updateOperators<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
These are the supported update operators
</div>
<dl class="details">
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt class="name" id=".$dec">
<h4><span class="type-signature"><static> </span>$dec<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Decrements a field by the amount you specify. It takes the form
`{ $dec: { field1: amount }`
</div>
<dl class="details">
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
probe.update( obj, {'name.last' : 'Owen', 'name.first' : 'LeRoy'},
{$dec : {'password.changes' : 2}} );</pre>
</dd>
<dt class="name" id=".$inc">
<h4><span class="type-signature"><static> </span>$inc<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Increments a field by the amount you specify. It takes the form
`{ $inc: { field1: amount } }`
</div>
<dl class="details">
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
probe.update( obj, {'name.last' : 'Owen', 'name.first' : 'LeRoy'},
{$inc : {'password.changes' : 2}} );</pre>
</dd>
<dt class="name" id=".$pop">
<h4><span class="type-signature"><static> </span>$pop<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
The $pop operator removes the first or last element of an array. Pass $pop a value of 1 to remove the last element
in an array and a value of -1 to remove the first element of an array. This will only work on arrays. Syntax:
`{ $pop: { field: 1 } }` or `{ $pop: { field: -1 } }`
</div>
<dl class="details">
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
// attr is the name of the array field
probe.update( data, {_id : '511d18827da2b88b09000133'}, {$pop : {attr : 1}} );</pre>
</dd>
<dt class="name" id=".$pull">
<h4><span class="type-signature"><static> </span>$pull<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
The $pull operator removes all instances of a value from an existing array. It looks like this:
`{ $pull: { field: <query> } }`
</div>
<dl class="details">
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
// attr is the name of the array field
probe.update( data, {'email' : 'EWallace.43@fauxprisons.com'},
{$pull : {attr : {"color" : "green"}}} );</pre>
</dd>
<dt class="name" id=".$push">
<h4><span class="type-signature"><static> </span>$push<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
The $push operator appends a specified value to an array. It looks like this:
`{ $push: { <field>: <value> } }`
</div>
<dl class="details">
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
// attr is the name of the array field
probe.update( data, {_id : '511d18827da2b88b09000133'},
{$push : {attr : {"hand" : "new", "color" : "new"}}} );</pre>
</dd>
<dt class="name" id=".$unset">
<h4><span class="type-signature"><static> </span>$unset<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Removes the field from the object. It takes the form
`{ $unset: { field1: "" } }`
</div>
<dl class="details">
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var probe = require("documents/probe");
probe.update( data, {'name.first' : 'Yogi'}, {$unset : {'name.first' : ''}} );</pre>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Copyright © 2014 <a href='http://moogs.io' target='_blank'>Moogs, LLC.</a>
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc" target="_blank">JSDoc 3.4.3</a>
on 2017-07-16T00:18:22-07:00
</span>
</footer>
</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>