Make docs a little less confusing by removing an internal class

This commit is contained in:
Timothy Warren 2016-09-14 21:59:18 -04:00
parent 8d7e4aaa8c
commit 692c07ba74
3 changed files with 5 additions and 453 deletions

53
API.md
View File

@ -1,58 +1,5 @@
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> <!-- Generated by documentation.js. Update this documentation by updating the source code. -->
# limit
Set the limit clause
**Parameters**
- `sql` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** SQL statement to modify
- `limit` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Maximum number of rows to fetch
- `offset` **\[[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)]** Number of rows to skip
Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Modified SQL statement
# quoteTable
Quote database table name, and set prefix
**Parameters**
- `table` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Table name to quote
Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Quoted table name
# quoteIdentifiers
Use the driver's escape character to quote identifiers
**Parameters**
- `str` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** String or array of strings to quote identifiers
Returns **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** Quoted identifier(s)
# truncate
Generate SQL to truncate the passed table
**Parameters**
- `table` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Table to truncate
Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Truncation SQL
# insertBatch
Generate SQL to insert a group of rows
**Parameters**
- `table` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The table to insert to
- `data` **\[[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)]** The array of object containing data to insert
Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Query and data to insert
# NodeQuery # NodeQuery
Class for connection management Class for connection management

View File

@ -24,56 +24,6 @@
<ul class='list-reset h5 py1-ul'> <ul class='list-reset h5 py1-ul'>
<li><a
href='#limit'
class="">
limit
</a>
</li>
<li><a
href='#quotetable'
class="">
quoteTable
</a>
</li>
<li><a
href='#quoteidentifiers'
class="">
quoteIdentifiers
</a>
</li>
<li><a
href='#truncate'
class="">
truncate
</a>
</li>
<li><a
href='#insertbatch'
class="">
insertBatch
</a>
</li>
<li><a <li><a
href='#nodequery' href='#nodequery'
class=" toggle-sibling"> class=" toggle-sibling">
@ -410,355 +360,6 @@
<div class='fix-margin-3'> <div class='fix-margin-3'>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
<h3 class='fl m0' id='limit'>
limit
</h3>
</div>
<p>Set the limit clause</p>
<div class='pre p1 fill-light mt0'>limit(sql: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, limit: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>, offset: [<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>]): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>sql</span> <code class='quiet'>(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code> SQL statement to modify
</div>
</div>
<div class='space-bottom0'>
<div>
<span class='code bold'>limit</span> <code class='quiet'>(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)</code> Maximum number of rows to fetch
</div>
</div>
<div class='space-bottom0'>
<div>
<span class='code bold'>offset</span> <code class='quiet'>([<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>])</code> Number of rows to skip
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
Modified SQL statement
</section>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
<h3 class='fl m0' id='quotetable'>
quoteTable
</h3>
</div>
<p>Quote database table name, and set prefix</p>
<div class='pre p1 fill-light mt0'>quoteTable(table: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code> Table name to quote
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
Quoted table name
</section>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
<h3 class='fl m0' id='quoteidentifiers'>
quoteIdentifiers
</h3>
</div>
<p>Use the driver&#x27;s escape character to quote identifiers</p>
<div class='pre p1 fill-light mt0'>quoteIdentifiers(str: (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)): (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</div>
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>str</span> <code class='quiet'>((<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>))</code> String or array of strings to quote identifiers
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code>(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>:
Quoted identifier(s)
</section>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
<h3 class='fl m0' id='truncate'>
truncate
</h3>
</div>
<p>Generate SQL to truncate the passed table</p>
<div class='pre p1 fill-light mt0'>truncate(table: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code> Table to truncate
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
Truncation SQL
</section>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
<h3 class='fl m0' id='insertbatch'>
insertBatch
</h3>
</div>
<p>Generate SQL to insert a group of rows</p>
<div class='pre p1 fill-light mt0'>insertBatch(table: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, data: [<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>]): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code> The table to insert to
</div>
</div>
<div class='space-bottom0'>
<div>
<span class='code bold'>data</span> <code class='quiet'>([<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>])</code> The array of object containing data to insert
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
Query and data to insert
</section>
<section class='p2 mb2 clearfix bg-white minishadow'> <section class='p2 mb2 clearfix bg-white minishadow'>

View File

@ -30,7 +30,7 @@ const Driver = {
/** /**
* Set the limit clause * Set the limit clause
* @private
* @param {String} sql - SQL statement to modify * @param {String} sql - SQL statement to modify
* @param {Number} limit - Maximum number of rows to fetch * @param {Number} limit - Maximum number of rows to fetch
* @param {Number} [offset] - Number of rows to skip * @param {Number} [offset] - Number of rows to skip
@ -49,6 +49,7 @@ const Driver = {
/** /**
* Quote database table name, and set prefix * Quote database table name, and set prefix
* *
* @private
* @param {String} table - Table name to quote * @param {String} table - Table name to quote
* @return {String} - Quoted table name * @return {String} - Quoted table name
*/ */
@ -60,6 +61,7 @@ const Driver = {
/** /**
* Use the driver's escape character to quote identifiers * Use the driver's escape character to quote identifiers
* *
* @private
* @param {String|Array} str - String or array of strings to quote identifiers * @param {String|Array} str - String or array of strings to quote identifiers
* @return {String|Array} - Quoted identifier(s) * @return {String|Array} - Quoted identifier(s)
*/ */
@ -103,6 +105,7 @@ const Driver = {
/** /**
* Generate SQL to truncate the passed table * Generate SQL to truncate the passed table
* *
* @private
* @param {String} table - Table to truncate * @param {String} table - Table to truncate
* @return {String} - Truncation SQL * @return {String} - Truncation SQL
*/ */
@ -119,6 +122,7 @@ const Driver = {
/** /**
* Generate SQL to insert a group of rows * Generate SQL to insert a group of rows
* *
* @private
* @param {String} table - The table to insert to * @param {String} table - The table to insert to
* @param {Array} [data] - The array of object containing data to insert * @param {Array} [data] - The array of object containing data to insert
* @return {String} - Query and data to insert * @return {String} - Query and data to insert