Update package.json and docs

This commit is contained in:
Timothy Warren 2014-11-03 11:12:27 -05:00
parent 1c449eced0
commit d6059b87d6
15 changed files with 46 additions and 23 deletions

View File

@ -110,7 +110,7 @@ module.exports = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -252,7 +252,7 @@ module.exports = d;</pre>
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -168,7 +168,7 @@ module.exports = h;</pre>
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -98,13 +98,18 @@
<li>mysql</li> <li>mysql</li>
<li>mysql2</li> <li>mysql2</li>
<li>pg</li> <li>pg</li>
<li>dblite</li>
<li>sqlite3</li>
</ul> </ul>
<h3>Installation</h3><pre class="prettyprint source"><code>npm install ci-node-query</code></pre><h3>Basic use</h3><pre class="prettyprint source"><code>var nodeQuery = require('ci-node-query'); <h3>Installation</h3><pre class="prettyprint source"><code>npm install ci-node-query</code></pre><h3>Basic use</h3><pre class="prettyprint source"><code>var nodeQuery = require('ci-node-query');
var connection = ... // Database module connection var connection = ... // Database module connection
// Three arguments: database type, database connection, database connection library // Three arguments: database type, database connection, database connection library
var query = nodeQuery('mysql', connection, 'mysql2'); var query = nodeQuery.init('mysql', connection, 'mysql2');
// You can also retrieve the instance later
query = nodeQuery.getQuery();
query.select('foo') query.select('foo')
.from('bar') .from('bar')
@ -142,7 +147,7 @@ query.select('foo')
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -354,7 +354,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -170,7 +170,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -686,7 +686,7 @@ function name, eg isNumber</p>
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -224,7 +224,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="node-query.js.html">node-query.js</a>, <a href="node-query.js.html">node-query.js</a>,
<a href="node-query.js.html#sunlight-1-line-15">line 15</a> <a href="node-query.js.html#sunlight-1-line-17">line 17</a>
</li> </li>
</ul> </ul>
</dd> </dd>
@ -358,7 +358,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -6007,7 +6007,7 @@ prefixed with 'OR NOT'</p>
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -466,7 +466,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -158,7 +158,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -78,6 +78,8 @@
/** @module node-query */ /** @module node-query */
var nodeQuery = {}; var nodeQuery = {};
var instance = null;
/** /**
* Create a query builder object * Create a query builder object
* *
@ -104,11 +106,25 @@ nodeQuery.init = function (driverType, connObject, connLib) {
} }
}); });
return qb(require(paths.driver), require(paths.adapter)(connObject)); instance = qb(require(paths.driver), require(paths.adapter)(connObject));
return instance;
}; };
/**
* Return an existing query builder instance
*
* @return {queryBuilder}
*/
nodeQuery.getQuery = function () {
if ( ! instance) {
throw new Error("No Query Builder instance to return");
}
module.exports = nodeQuery.init;</pre> return instance;
};
module.exports = nodeQuery;</pre>
</article> </article>
</section> </section>
@ -129,7 +145,7 @@ module.exports = nodeQuery.init;</pre>
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -985,7 +985,7 @@ module.exports = QueryBuilder;</pre>
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -184,7 +184,7 @@ module.exports = QueryParser;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
on Fri Oct 31st 2014 using the <a on Mon Nov 3rd 2014 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>. href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span> </span>
</footer> </footer>

View File

@ -1,6 +1,6 @@
{ {
"name": "ci-node-query", "name": "ci-node-query",
"version": "0.2.0", "version": "1.0.0",
"description": "A query builder for node based on the one in CodeIgniter", "description": "A query builder for node based on the one in CodeIgniter",
"author": "Timothy J Warren <tim@timshomepage.net>", "author": "Timothy J Warren <tim@timshomepage.net>",
"engines": { "engines": {
@ -11,14 +11,15 @@
"url": "https://github.com/timw4mail/node-query.git" "url": "https://github.com/timw4mail/node-query.git"
}, },
"keywords": [ "keywords": [
"codeigniter", "codeigniter",
"mysql2", "mysql2",
"mysql", "mysql",
"query builder", "query builder",
"pg", "pg",
"postgres", "postgres",
"sqlite", "sqlite",
"dblite" "dblite",
"sqlite3"
], ],
"bugs": { "bugs": {
"url": "https://github.com/timw4mail/node-query/issues" "url": "https://github.com/timw4mail/node-query/issues"
@ -45,7 +46,8 @@
"mysql2": "^0.12.5", "mysql2": "^0.12.5",
"node-firebird": "^0.2.3", "node-firebird": "^0.2.3",
"nodeunit": "^0.9.0", "nodeunit": "^0.9.0",
"pg": "^3.6.2" "pg": "^3.6.2",
"sqlite3": "^3.0.2"
}, },
"peerDependencies": { "peerDependencies": {
"mysql": "", "mysql": "",