Update docs

This commit is contained in:
Timothy Warren 2014-10-27 15:47:22 -04:00
parent 64b480c8e1
commit 145007797b
4 changed files with 219 additions and 6 deletions

View File

@ -15,9 +15,10 @@ A node query builder for various SQL databases, based on CodeIgniter's query bui
.from('bar')
.where('x', 3)
.orWhere('y', 2)
.join('baz', 'baz.boo = bar.foo', 'left')
.orderBy('x')
.limit(2, 3)
.get(function(err, result) {
.get(function(/* Adapter dependent arguments */) {
// Database module result handling
});

View File

@ -104,9 +104,10 @@ query.select('foo')
.from('bar')
.where('x', 3)
.orWhere('y', 2)
.join('baz', 'baz.boo = bar.foo', 'left')
.orderBy('x')
.limit(2, 3)
.get(function(err, result) {
.get(function(/* Adapter dependent arguments */) {
// Database module result handling
});</code></pre></article>
</section>

View File

@ -745,7 +745,7 @@
<ul class="dummy">
<li>
<a href="query-builder.js.html">query-builder.js</a>,
<a href="query-builder.js.html#sunlight-1-line-861">line 861</a>
<a href="query-builder.js.html#sunlight-1-line-862">line 862</a>
</li>
</ul>
</dd>
@ -944,7 +944,7 @@
<ul class="dummy">
<li>
<a href="query-builder.js.html">query-builder.js</a>,
<a href="query-builder.js.html#sunlight-1-line-839">line 839</a>
<a href="query-builder.js.html#sunlight-1-line-840">line 840</a>
</li>
</ul>
</dd>
@ -1145,7 +1145,7 @@
<ul class="dummy">
<li>
<a href="query-builder.js.html">query-builder.js</a>,
<a href="query-builder.js.html#sunlight-1-line-823">line 823</a>
<a href="query-builder.js.html#sunlight-1-line-824">line 824</a>
</li>
</ul>
</dd>
@ -1336,7 +1336,7 @@
<ul class="dummy">
<li>
<a href="query-builder.js.html">query-builder.js</a>,
<a href="query-builder.js.html#sunlight-1-line-850">line 850</a>
<a href="query-builder.js.html#sunlight-1-line-851">line 851</a>
</li>
</ul>
</dd>
@ -5581,6 +5581,216 @@ prefixed with 'OR NOT'</p>
</dd>
<dt>
<h4 class="name" id="delete"><span class="type-signature">&lt;inner> </span>delete<span class="signature">(table, <span class="optional">where</span>, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Run the generated delete query</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>table</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The table to insert into</p></td>
</tr>
<tr>
<td class="name"><code>where</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>Where clause for delete statement</p></td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Callback for handling response from the database</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="query-builder.js.html">query-builder.js</a>,
<a href="query-builder.js.html#sunlight-1-line-792">line 792</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>void</p>
</div>
</dd>
</dl>

View File

@ -867,6 +867,7 @@ var QueryBuilder = function(driver, adapter) {
/**
* Run the generated delete query
*
* @method delete
* @param {String} table - The table to insert into
* @param {Object} [where] - Where clause for delete statement
* @param {Function} callback - Callback for handling response from the database