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();