1db.connections.update({
2 user: data.username,
3 chatroomID: data.chatroomID
4}, {
5 where: { socketID: socket.id },
6 returning: true,
7 plain: true
8})
9.then(function (result) {
10 console.log(result);
11 // result = [x] or [x, y]
12 // [x] if you're not using Postgres
13 // [x, y] if you are using Postgres
14});
15