mariano/node-db-mysql — Issue #34: Reusing connections
Author: NHQ
Created: 2011-11-01 21:21:30+00:00
State: open

In the examples, all actions are chained to the original Database class, through .connect(). Eg. I was unable to do this:

var mysql = require('db-mysql');
new mysql.Database({
hostname: 'hyfnrsx.com',
user: 'remote',
password: '2bq44acLtPTx2D46',
database: 'online-presence-scrubber'
}).connect(function(error) {})

// something else happening

mysql.query().select('..') ...

// or

mysql.Database.query()...

Is there a way to reuse the options and connection for later querying?