periodicjs.core.data
Version:
Core data is the ORM wrapping component of periodicjs.core.controller that provides database adapters for commonly used databases (ie. mongo, sql, postgres). Adapters provide a standard set of methods and options regardless of the type of database and so
3,450 lines (1,032 loc) • 246 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Global</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">Global</h1>
<section>
<header>
<h2></h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="EXAMPLE"><span class="type-signature">(constant) </span>EXAMPLE<span class="type-signature"></span></h4>
<div class="description">
<p>Default changeset schema for sql databases</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="test_examples_sequelize_model.js.html">test/examples/sequelize_model.js</a>, <a href="test_examples_sequelize_model.js.html#line7">line 7</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_CREATE"><span class="type-signature"></span>_CREATE<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .create mongoose method</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for mongo create</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The mongoose model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>newdoc</code></td>
<td class="type">
<span class="param-type">Object</span>
|
<span class="param-type">Array.<Object></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
options
</td>
<td class="description last"><p>The document that should be created. If newdoc option is not passed it is assumed that the entire options object is the document</p></td>
</tr>
<tr>
<td class="name"><code>bulk_create</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If true and options.newdoc is an array each index will be treated as an individual document and be bulk inserted</p></td>
</tr>
<tr>
<td class="name"><code>skip_xss</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If true xss character escaping will be skipped and xss whitelist is ignored</p></td>
</tr>
<tr>
<td class="name"><code>html_xss</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If true xss npm module will be used for character escaping</p></td>
</tr>
<tr>
<td class="name"><code>xss_whitelist</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.xss_whitelist
</td>
<td class="description last"><p>XSS white-list configuration for xss npm module</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for create</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_mongo.js.html">adapters/mongo.js</a>, <a href="adapters_mongo.js.html#line370">line 370</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_CREATE"><span class="type-signature"></span>_CREATE<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .create lowkie method</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for loki create</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The lowkie model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>newdoc</code></td>
<td class="type">
<span class="param-type">Object</span>
|
<span class="param-type">Array.<Object></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
options
</td>
<td class="description last"><p>The document that should be created. If newdoc option is not passed it is assumed that the entire options object is the document</p></td>
</tr>
<tr>
<td class="name"><code>bulk_create</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If true and options.newdoc is an array each index will be treated as an individual document and be bulk inserted</p></td>
</tr>
<tr>
<td class="name"><code>skip_xss</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If true xss character escaping will be skipped and xss whitelist is ignored</p></td>
</tr>
<tr>
<td class="name"><code>html_xss</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If true xss npm module will be used for character escaping</p></td>
</tr>
<tr>
<td class="name"><code>xss_whitelist</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.xss_whitelist
</td>
<td class="description last"><p>XSS white-list configuration for xss npm module</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for create</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_loki.js.html">adapters/loki.js</a>, <a href="adapters_loki.js.html#line403">line 403</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_CREATE"><span class="type-signature"></span>_CREATE<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .create sequelize method</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for SQL create</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The sequelize model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>newdoc</code></td>
<td class="type">
<span class="param-type">Object</span>
|
<span class="param-type">Array.<Object></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
options
</td>
<td class="description last"><p>The document that should be created. If newdoc option is not passed it is assumed that the entire options object is the document. A bulk create will be done if newdoc is an array and bulk_create option is true</p></td>
</tr>
<tr>
<td class="name"><code>bulk_create</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If true and options.newdoc is an array each index will be treated as an individual document and be bulk inserted (WARNING: Due to limitations in MySQL and other SQL variants bulk creates can't assign auto-incremented ids please use accordingly)</p></td>
</tr>
<tr>
<td class="name"><code>skip_xss</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If true xss character escaping will be skipped and xss whitelist is ignored</p></td>
</tr>
<tr>
<td class="name"><code>html_xss</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If true xss npm module will be used for character escaping</p></td>
</tr>
<tr>
<td class="name"><code>xss_whitelist</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.xss_whitelist
</td>
<td class="description last"><p>XSS white-list configuration for xss npm module</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for create</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_sql.js.html">adapters/sql.js</a>, <a href="adapters_sql.js.html#line393">line 393</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_DELETE"><span class="type-signature"></span>_DELETE<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .remove mongoose method</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for mongo delete</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The mongoose model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>deleteid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The mongo id of the document that should be removed</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If options.deleteid is provided this value is ignored - alias for options.deleteid</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for delete</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_mongo.js.html">adapters/mongo.js</a>, <a href="adapters_mongo.js.html#line397">line 397</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_DELETE"><span class="type-signature"></span>_DELETE<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .remove lowkie method</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for loki delete</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The lowkie model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>deleteid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The loki id of the document that should be removed</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If options.deleteid is provided this value is ignored - alias for options.deleteid</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for delete</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_loki.js.html">adapters/loki.js</a>, <a href="adapters_loki.js.html#line433">line 433</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_DELETE"><span class="type-signature"></span>_DELETE<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .destroy sequelize method</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for SQL delete</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The sequelize model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>deleteid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The SQL id of the document that should be removed</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If options.deleteid is provided this value is ignored - alias for options.deleteid</p></td>
</tr>
<tr>
<td class="name"><code>force</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If true document will always be fully deleted (if paranoid option is set on model this option will override)</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for delete</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_sql.js.html">adapters/sql.js</a>, <a href="adapters_sql.js.html#line424">line 424</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_DELETED"><span class="type-signature"></span>_DELETED<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .destroy sequelize method but returns the deleted document</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for SQL delete</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The sequelize model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>deleteid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The SQL id of the document that should be removed</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If options.deleteid is provided this value is ignored - alias for options.deleteid</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for delete</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_sql.js.html">adapters/sql.js</a>, <a href="adapters_sql.js.html#line454">line 454</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_DELETED"><span class="type-signature"></span>_DELETED<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .remove mongoose method but returns the deleted document</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for mongo delete</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The mongoose model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>deleteid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The mongo id of the document that should be removed</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If options.deleteid is provided this value is ignored - alias for options.deleteid</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for delete</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_mongo.js.html">adapters/mongo.js</a>, <a href="adapters_mongo.js.html#line417">line 417</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_DELETED"><span class="type-signature"></span>_DELETED<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .remove lowkie method but returns the deleted document</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for loki delete</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The lowkie model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>deleteid</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The loki id of the document that should be removed</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If options.deleteid is provided this value is ignored - alias for options.deleteid</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>Callback function for delete</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="adapters_loki.js.html">adapters/loki.js</a>, <a href="adapters_loki.js.html#line455">line 455</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_LOAD"><span class="type-signature"></span>_LOAD<span class="signature">(options, cb)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Convenience method for .findOne or .findById lowkie methods</p>
</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>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Configurable options for loki query</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.model
</td>
<td class="description last"><p>The lowkie model for query will default to the this.model value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>sort</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.sort
</td>
<td class="description last"><p>Sorting criteria for query will default to the this.sort value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>population</code></td>
<td class="type">
<span class="param-type">Object</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.population
</td>
<td class="description last"><p>The lowkie population for query will default to the this.population value if not defined</p></td>
</tr>
<tr>
<td class="name"><code>fields</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
this.fields
</td>
<td class="description last"><p>The fields that should be returned in query will default to the this.fields value if not defined</p></td>
</tr>
<tr>