Update docs and readme

This commit is contained in:
Timothy Warren 2014-12-01 14:07:29 -05:00
parent 85da806158
commit bc959b4952
2 changed files with 12 additions and 2 deletions

View File

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

View File

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