Update package.json and docs
This commit is contained in:
parent
1c449eced0
commit
d6059b87d6
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
12
package.json
12
package.json
@ -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": "",
|
||||||
|
Loading…
Reference in New Issue
Block a user