From bc959b4952918ce002e4a734ae448d7c88f22dc5 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Mon, 1 Dec 2014 14:07:29 -0500 Subject: [PATCH] Update docs and readme --- README.md | 7 ++++++- docs/index.html | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30be692..3392416 100755 --- a/README.md +++ b/README.md @@ -23,9 +23,14 @@ A node query builder for various SQL databases, based on CodeIgniter's query bui 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.init('mysql', connection, 'mysql2'); + // The third argument is optional if the database connection library has the same name as the adapter, eg.. + nodeQuery.init('mysql', connection, 'mysql'); + // Can be instead + nodeQuery.init('mysql', connection); + // You can also retrieve the instance later query = nodeQuery.getQuery(); diff --git a/docs/index.html b/docs/index.html index 4c4d1ed..e747466 100644 --- a/docs/index.html +++ b/docs/index.html @@ -106,9 +106,14 @@ 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.init('mysql', connection, 'mysql2'); +// The third argument is optional if the database connection library has the same name as the adapter, eg.. +nodeQuery.init('mysql', connection, 'mysql'); +// Can be instead +nodeQuery.init('mysql', connection); + // You can also retrieve the instance later query = nodeQuery.getQuery();