I have a query:
const getRunsByProjectTable = {
text: 'Select pvt(); Execute pvtstmt;'
} ;
const getRunsByProjectTable = (req, res) => {
pool.query(queries.getRunsByProjectTable, (error, results) => {
if (error) throw error;
res.status(200).json(results.rows);
})
}
It does not return anything but on pgAdmin, I am getting the desired table. Does anyone know what the problem may be?