꧁岡
const someAsyncFunction = () => {
return Collection.find(query).skip(10).limit(99).then(arr=>{
const IDs = arr.map(doc=>doc._id);
return Collection.update(
{ _id: { $in: IDs } },
{ $set: { fieldToUpdate: 'value' } }
);
})
};
Size: a a a
꧁岡
CM
T
CM
T
CM
И
И
СБ
S🛸
T
M
go
M
ИН
Ф
А
𝕬𝕱
G
const Sequelize = require('sequelize')
const dbName = 'node_todo',
userName = 'root',
password = 'Godfather123'
const sequelize = new Sequelize(dbName, userName, password, {
host: 'localhost',
dialect: 'mysql'
})
module.exports = sequelize