jsdoc-oblivion
Version:
A gray and blue theme for JSDoc.
2,054 lines (779 loc) • 27.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: OCollector</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="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>
</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: OCollector</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="collector.html">ink/collector</a>~</span>
OCollector
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="OCollector"><span class="type-signature"></span>new OCollector<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
An object based collector
</div>
<dl class="details">
</dl>
</dd>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="collector-CollectorBase.html">module:documents/collector~CollectorBase</a></li>
</ul>
<h3 class="subsection-title">Members</h3>
<dl>
<dt class="name" id="length">
<h4><span class="type-signature"></span>length<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
Get the size of the collection
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#length">module:documents/collector~CollectorBase#length</a>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="all"><span class="type-signature"></span>all<span class="signature">(qu)</span><span class="type-signature"> → {boolean}</span></h4>
</dt>
<dd>
<div class="description">
Returns true if all items match the query. Aliases as `every`
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#all">module:documents/collector~CollectorBase#all</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="any"><span class="type-signature"></span>any<span class="signature">(qu)</span><span class="type-signature"> → {boolean}</span></h4>
</dt>
<dd>
<div class="description">
Returns true if any of the items match the query. Aliases as `all`
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#any">module:documents/collector~CollectorBase#any</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="every"><span class="type-signature"></span>every<span class="signature">(qu)</span><span class="type-signature"> → {boolean}</span></h4>
</dt>
<dd>
<div class="description">
Returns true if all items match the query. Aliases as `all`
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#every">module:documents/collector~CollectorBase#every</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(qu)</span><span class="type-signature"> → {array}</span></h4>
</dt>
<dd>
<div class="description">
Find all records that match a query
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute.</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#find">module:documents/collector~CollectorBase#find</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The results
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="findKeys"><span class="type-signature"></span>findKeys<span class="signature">(qu)</span><span class="type-signature"> → {array}</span></h4>
</dt>
<dd>
<div class="description">
Find all records that match a query and returns the keys for those items. This is similar to module:ink/probe.find but instead of returning
records, returns the keys. If `obj` is an object it will return the hash key. If 'obj' is an array, it will return the index
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute.</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#findKeys">module:documents/collector~CollectorBase#findKeys</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="findOne"><span class="type-signature"></span>findOne<span class="signature">(qu)</span><span class="type-signature"> → {object}</span></h4>
</dt>
<dd>
<div class="description">
Returns the first record that matches the query. Aliased as `seek`.
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute.</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#findOne">module:documents/collector~CollectorBase#findOne</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="findOneKey"><span class="type-signature"></span>findOneKey<span class="signature">(qu)</span><span class="type-signature"> → {object}</span></h4>
</dt>
<dd>
<div class="description">
Returns the first record that matches the query and returns its key or index depending on whether `obj` is an object or array respectively.
Aliased as `seekKey`.
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute.</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#findOneKey">module:documents/collector~CollectorBase#findOneKey</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">(qu)</span><span class="type-signature"> → {object|array}</span></h4>
</dt>
<dd>
<div class="description">
Remove all items in the object/array that match the query
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute. See module:ink/probe.queryOperators for the operators you can use.</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#remove">module:documents/collector~CollectorBase#remove</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The array or object as appropriate without the records.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
|
<span class="param-type">array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="some"><span class="type-signature"></span>some<span class="signature">(qu)</span><span class="type-signature"> → {boolean}</span></h4>
</dt>
<dd>
<div class="description">
Returns true if any of the items match the query. Aliases as `any`
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#some">module:documents/collector~CollectorBase#some</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="unique"><span class="type-signature"></span>unique<span class="signature">(qu)</span><span class="type-signature"> → {array}</span></h4>
</dt>
<dd>
<div class="description">
Returns the set of unique records that match a query
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query to execute.</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#unique">module:documents/collector~CollectorBase#unique</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">(qu, setDocument)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Updates all records in obj that match the query. See module:ink/probe.updateOperators for the operators that are supported.
</div>
<h5>Parameters:</h5>
<div class="params-table-container">
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>qu</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The query which will be used to identify the records to updated</td>
</tr>
<tr>
<td class="name"><code>setDocument</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">The update operator. See module:ink/probe.updateOperators</td>
</tr>
</tbody>
</table>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from">
<ul class="dummy">
<li>
<a href="collector-CollectorBase.html#update">module:documents/collector~CollectorBase#update</a>
</li>
</ul>
</dd>
</dl>
</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.3.0-alpha9</a>
on 2014-09-07T09:05:23-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>