Node-DBI users are encouraged to write code like the following (in Coffeescript):
db = new DBWrapper 'sqlite3', { ... }
db.connect()
console.error 'Failed to connect to database' if not db.isConnected()
The two solutions to this issue are:
- use
async, and document this in README.md:
db = new DBWrapper 'sqlite3', { ... }
async.series [
-> db.connect()
-> console.error 'Failed to connect to database' if not db.isConnected()
]
- provide a callback in the
connect(): i.e. change the interface to connect(callback)
Node-DBI users are encouraged to write code like the following (in Coffeescript):
The two solutions to this issue are:
async, and document this inREADME.md:connect(): i.e. change the interface toconnect(callback)