Answers for "sequelize pagination postgres"

0

sequelize pagination postgres

const limit = 10;
const offset = (req.body.page - 1) * limit;

const result = await Posts.findAndCountAll({
  offset: offset,
  limit: limit,
  order: [
    ['date', 'ASC']
  ]
});
Posted by: Guest on April-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language