Sequelize – update record, and return result
Here’s what I think you’re looking for. db.connections.update({ user: data.username, chatroomID: data.chatroomID }, { where: { socketID: socket.id }, returning: true, plain: true }) .then(function (result) { console.log(result); // result = [x] or [x, y] // [x] if you’re not using Postgres // [x, y] if you are using Postgres }); From Sequelize docs: The … Read more