Closed nilist closed 5 years ago
Another way I got is operating the tow collection of the query or find API, like this
Tbl1.all(function(err, ds1) {
if (err) throw err;
Tbl2.all(function(err, ds2) {
if (err) throw err;
operate ds1 and ds2... ...
});
});
Using some module like async will make it beautiful.
I would like to union two table while querying. like this:
SELECT tbl1.name FROM tbl1 UNION ALL SELECT tbl2.name FROM tbl2 ORDER BY name LIMIT 10, 10;
Is there any other API to achieve this exceptdriver.execQuery
. @dresende