I used util.promisify on this sqlite3
function:
// Before
db.each("Select * from example;", (error, row) => console.table(row));
db.each = util.promisify(db.each);
// After
async function getRow()
try {
console.table(await db.each("Select * from example;")); // line 7
} catch (e) {
console.error(e.message);
}
}
My question is, how does promisify know which variable (the "err" or the "row") to return in line 7?