Answers for "find total sequelize"

0

sequelize count all

Project.count().then(c => {
  console.log("There are " + c + " projects!")
})

Project.count({ where: {'id': {[Op.gt]: 25}} }).then(c => {
  console.log("There are " + c + " projects with an id greater than 25.")
})
Posted by: Guest on January-29-2021
0

sequelize findall return

Model.findAll({
  attributes: [[sequelize.fn('COUNT', sequelize.col('hats')), 'no_hats']]
});
Posted by: Guest on September-05-2020

Browse Popular Code Answers by Language