forerunnerdb
Version:
A NoSQL document store database for browsers and Node.js.
1,485 lines (383 loc) • 20 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Overview</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Overview</h1>
<section>
<header>
<h2>Overview</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Overview"><span class="type-signature"></span>new Overview<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
The Overview class provides a queryable interface for data aggregation in realtime.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line15">line 15</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="Overview_init.html">init</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<ul><li><a href="#isLinked"><span class="type-signature">(static) </span>isLinked<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></a></li><li><a href="#link"><span class="type-signature">(static) </span>link<span class="signature">(outputTargetSelector, templateSelector, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#unlink"><span class="type-signature">(static) </span>unlink<span class="signature">(outputTargetSelector, templateSelector)</span><span class="type-signature"></span></a></li><li><a href="#count"><span class="type-signature"></span>count<span class="signature">()</span><span class="type-signature"> → {*}</span></a></li><li><a href="#data"><span class="type-signature"></span>data<span class="signature">()</span><span class="type-signature"> → {<a href="Collection.html">Collection</a>}</span></a></li><li><a href="#drop"><span class="type-signature"></span>drop<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Boolean}</span></a></li><li><a href="#exec"><span class="type-signature"></span>exec<span class="signature">()</span><span class="type-signature"> → {*}</span></a></li><li><a href="#find"><span class="type-signature"></span>find<span class="signature">(query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {*}</span></a></li><li><a href="#from"><span class="type-signature"></span>from<span class="signature">(source)</span><span class="type-signature"> → {*}</span></a></li></ul>
<h4 class="name" id=".isLinked"><span class="type-signature">(static) </span>isLinked<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
Checks if the instance is data-bound to any DOM elements.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AutoBind.js.html">AutoBind.js</a>, <a href="AutoBind.js.html#line653">line 653</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
True if linked, false if not.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id=".link"><span class="type-signature">(static) </span>link<span class="signature">(outputTargetSelector, templateSelector, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Creates a link to the DOM between the overview data and the elements
in the passed output selector. When new elements are needed or changes
occur the passed templateSelector is used to get the template that is
output to the DOM.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>outputTargetSelector</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>templateSelector</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">An options object.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AutoBind.js.html">AutoBind.js</a>, <a href="AutoBind.js.html#line663">line 663</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li>unlink</li>
</ul>
</dd>
</dl>
<h4 class="name" id=".unlink"><span class="type-signature">(static) </span>unlink<span class="signature">(outputTargetSelector, templateSelector)</span><span class="type-signature"></span></h4>
<div class="description">
Removes a link to the DOM between the overview data and the elements
in the passed output selector that was created using the link() method.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>outputTargetSelector</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>templateSelector</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AutoBind.js.html">AutoBind.js</a>, <a href="AutoBind.js.html#line680">line 680</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li>link</li>
</ul>
</dd>
</dl>
<h4 class="name" id="count"><span class="type-signature"></span>count<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>
<div class="description">
Returns a count of the documents in the overview data set.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line159">line 159</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
<h4 class="name" id="data"><span class="type-signature"></span>data<span class="signature">()</span><span class="type-signature"> → {<a href="Collection.html">Collection</a>}</span></h4>
<div class="description">
Gets the module's internal data collection.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line268">line 268</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Collection.html">Collection</a></span>
</dd>
</dl>
<h4 class="name" id="drop"><span class="type-signature"></span>drop<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
Drops the overview.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">A callback function.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line277">line 277</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="exec"><span class="type-signature"></span>exec<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>
<div class="description">
Executes and returns the response from the current reduce method
assigned to the overview.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line149">line 149</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
<h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {*}</span></h4>
<div class="description">
Returns the data in the overview.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">The query object.</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">An options object.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">A callback method.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line140">line 140</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li>Collection.find()</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
<h4 class="name" id="from"><span class="type-signature"></span>from<span class="signature">(source)</span><span class="type-signature"> → {*}</span></h4>
<div class="description">
Gets / sets the data source the overview uses for underlying data.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>source</code></td>
<td class="type">
<span class="param-type"><a href="Collection.html">Collection</a></span>
|
<span class="param-type"><a href="View.html">View</a></span>
</td>
<td class="description last">The data source to set.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Overview.js.html">Overview.js</a>, <a href="Overview.js.html#line119">line 119</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ActiveBucket.html">ActiveBucket</a></li><li><a href="Angular.html">Angular</a></li><li><a href="AutoBind.html">AutoBind</a></li><li><a href="Collection.html">Collection</a></li><li><a href="CollectionGroup.html">CollectionGroup</a></li><li><a href="Condition.html">Condition</a></li><li><a href="Core.html">Core</a></li><li><a href="Db.html">Db</a></li><li><a href="Document.html">Document</a></li><li><a href="Grid.html">Grid</a></li><li><a href="Highchart.html">Highchart</a></li><li><a href="Index2d.html">Index2d</a></li><li><a href="IndexBinaryTree.html">IndexBinaryTree</a></li><li><a href="IndexHashMap.html">IndexHashMap</a></li><li><a href="Infinilist.html">Infinilist</a></li><li><a href="KeyValueStore.html">KeyValueStore</a></li><li><a href="Metrics.html">Metrics</a></li><li><a href="MyModule.html">MyModule</a></li><li><a href="NodeApiClient.html">NodeApiClient</a></li><li><a href="NodeApiServer.html">NodeApiServer</a></li><li><a href="NodeRAS.html">NodeRAS</a></li><li><a href="Odm.html">Odm</a></li><li><a href="OldView.html">OldView</a></li><li><a href="Operation.html">Operation</a></li><li><a href="Overload.html">Overload</a></li><li><a href="Overview.html">Overview</a></li><li><a href="Overview_init.html">init</a></li><li><a href="Path.html">Path</a></li><li><a href="Persist.html">Persist</a></li><li><a href="Procedure.html">Procedure</a></li><li><a href="ReactorIO.html">ReactorIO</a></li><li><a href="Section.html">Section</a></li><li><a href="Serialiser.html">Serialiser</a></li><li><a href="Shared.overload.html">overload</a></li><li><a href="View.html">View</a></li></ul><h3>Mixins</h3><ul><li><a href="ChainReactor.html">ChainReactor</a></li><li><a href="Common.html">Common</a></li><li><a href="Constants.html">Constants</a></li><li><a href="Events.html">Events</a></li><li><a href="Matching.html">Matching</a></li><li><a href="Shared.html">Shared</a></li><li><a href="Sorting.html">Sorting</a></li><li><a href="Tags.html">Tags</a></li><li><a href="Triggers.html">Triggers</a></li><li><a href="Updating.html">Updating</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Mar 01 2018 11:34:23 GMT+0000 (GMT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>