UNPKG

morefun-forerunnerdb

Version:

A NoSQL document store database for browsers and Node.js.

1,688 lines (384 loc) 20.1 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Grid</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: Grid</h1> <section> <header> <h2>Grid</h2> <div class="class-description">Grid</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Grid"><span class="type-signature"></span>new Grid<span class="signature">(selector, template, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Creates a new grid instance. </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>selector</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> </td> <td class="description last">jQuery selector.</td> </tr> <tr> <td class="name"><code>template</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> </td> <td class="description last">The template selector.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The options object to apply to the grid.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line16">line 16</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".count"><span class="type-signature">(static) </span>count<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4> <div class="description"> Returns the number of documents currently in the grid. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line520">line 520</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Number</span> </dd> </dl> <h4 class="name" id=".db"><span class="type-signature">(static) </span>db<span class="signature">(db<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4> <div class="description"> Gets / sets the db instance this class instance belongs to. </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>db</code></td> <td class="type"> <span class="param-type"><a href="Db.html">Db</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The db instance.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line143">line 143</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#boolean">boolean</a>}</span></h4> <div class="description"> Drops a grid and all it's stored data from the database. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line166">line 166</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> True on success, false on failure. </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#boolean">boolean</a></span> </dd> </dl> <h4 class="name" id=".from"><span class="type-signature">(static) </span>from<span class="signature">(collection)</span><span class="type-signature"> &rarr; {<a href="Grid.html">Grid</a>}</span></h4> <div class="description"> Sets the collection from which the grid will assemble its 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>collection</code></td> <td class="type"> <span class="param-type"><a href="Collection.html">Collection</a></span> </td> <td class="description last">The collection to use to assemble grid data.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line113">line 113</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Grid.html">Grid</a></span> </dd> </dl> <h4 class="name" id=".insert"><span class="type-signature">(static) </span>insert<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Executes an insert against the grid's underlying data-source. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line77">line 77</a> </li></ul></dd> </dl> <h4 class="name" id=".name"><span class="type-signature">(static) </span>name<span class="signature">(val<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Grid.html">Grid</a>}</span></h4> <div class="description"> Gets / sets the current name. </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>val</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The name 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="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line68">line 68</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Grid.html">Grid</a></span> </dd> </dl> <h4 class="name" id=".refresh"><span class="type-signature">(static) </span>refresh<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Refreshes the grid data such as ordering etc. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line251">line 251</a> </li></ul></dd> </dl> <h4 class="name" id=".remove"><span class="type-signature">(static) </span>remove<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Executes a remove against the grid's underlying data-source. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line104">line 104</a> </li></ul></dd> </dl> <h4 class="name" id=".state"><span class="type-signature">(static) </span>state<span class="signature">(val<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Grid.html">Grid</a>}</span></h4> <div class="description"> Gets / sets the current state. </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>val</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The name of the state 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="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line59">line 59</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Grid.html">Grid</a></span> </dd> </dl> <h4 class="name" id=".template"><span class="type-signature">(static) </span>template<span class="signature">(template)</span><span class="type-signature"> &rarr; {*}</span></h4> <div class="description"> Gets / sets the grid's HTML template to use when rendering. </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>template</code></td> <td class="type"> <span class="param-type">Selector</span> </td> <td class="description last">The template's jQuery selector.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line211">line 211</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id=".update"><span class="type-signature">(static) </span>update<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Executes an update against the grid's underlying data-source. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line86">line 86</a> </li></ul></dd> </dl> <h4 class="name" id=".updateById"><span class="type-signature">(static) </span>updateById<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Executes an updateById against the grid's underlying data-source. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line95">line 95</a> </li></ul></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="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="OldView.html">OldView</a></li><li><a href="Operation.html">Operation</a></li><li><a href="Overload.html">Overload</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="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="global.html#Shared">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>Global</h3><ul><li><a href="global.html#%2522boolean,function%2522">"boolean, function"</a></li><li><a href="global.html#%2522object,function%2522">"object, function"</a></li><li><a href="global.html#%2522object,object,function%2522">"object, object, function"</a></li><li><a href="global.html#%2522string,*,function%2522">"string, *, function"</a></li><li><a href="global.html#%2522string,function%2522">"string, function"</a></li><li><a href="global.html#%2522string,object,function%2522">"string, object, function"</a></li><li><a href="global.html#%2522string,object,object,function%2522">"string, object, object, function"</a></li><li><a href="global.html#%2522string,string,function%2522">"string, string, function"</a></li><li><a href="global.html#%2522string,string,object,function%2522">"string, string, object, function"</a></li><li><a href="global.html#%2522string,string,object,object,function%2522">"string, string, object, object, function"</a></li><li><a href="global.html#access">access</a></li><li><a href="global.html#boolean">boolean</a></li><li><a href="global.html#checksum">checksum</a></li><li><a href="global.html#Condition">Condition</a></li><li><a href="global.html#function">function</a></li><li><a href="global.html#MyModule">MyModule</a></li><li><a href="global.html#name">name</a></li><li><a href="global.html#NodeRAS">NodeRAS</a></li><li><a href="global.html#Section">Section</a></li><li><a href="global.html#server">server</a></li><li><a href="global.html#setData">setData</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 15 2016 17:25:36 GMT+0100 (BST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>