Querying WHERE table.attribute IN [array]
I don't know if this is already possible (I tried and got a syntax error) but it would be great if you could pass an array as a parameters to SQL files so you could do something similar to the following
where_in.sql
SELECT *
FROM table
WHERE table.table_id IN $1;
Then it would be called like this:
var table_id_list = [1,2,3,4,5];
db.where_in([table_id_list], (err, res) => {
// Do what you need to do...
});