// if there was an error signature
if (1 < callback.length) {
callback.call(self, null, rows);
} else {
// invoke it with the db object as context
callback.call(self, rows);
}
when using db.query(query, [ params ], async()) the dblite code calls callback.length and gets 0 causing callback.call(self, rows) to be called instead of callback.call(self, null, rows)
i don't know if it's possible to harmonize this with the other asynchronous packages that are used with dblite. comments? thanks!
That is very silly on the part of dblite. I'll add an error to the callback signature. You're going to need to upgrade to Cadence 0.2.x where new things happen.
https://github.com/WebReflection/dblite/blob/master/build/dblite.node.js#L350 has this:
when using
db.query(query, [ params ], async())
the dblite code callscallback.length
and gets 0 causingcallback.call(self, rows)
to be called instead ofcallback.call(self, null, rows)
i don't know if it's possible to harmonize this with the other asynchronous packages that are used with
dblite
. comments? thanks!