Every line of 'sequelize update' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
35 public async update(query: T, newValue: T, multi = false): Promise { 36 return await this.performOperation('update', { query, value: newValue, multi }); 37 }
23 function updateUser(id, updates) { 24 return Users().where('id', parseInt(id)).update(updates, '*'); 25 }
120 update( 121 modelClass: Class, 122 entity: EntityData, 123 options: Options, 124 ): Promise { 125 throw new Error('Not implemented yet.'); 126 }
18 update (query, data) { 19 return this.table.updateOne(query, { 20 $set: data 21 }); 22 }
66 update (where, item) { 67 return new Promise ((resolve, reject) => { 68 this.collection.update(where, {$set: item}, (err, res) => { 69 if (err) return reject(err); 70 resolve(res); 71 }); 72 }); 73 }
56 update (...args) { 57 return super.update(...args).then((result) => { 58 return new JSData.utils.Promise((resolve) => { 59 setTimeout(() => resolve(result), 500); 60 }); 61 }); 62 }
22 update(data) { 23 return this.execute(configurationApi.updateConfiguration, data); 24 }
44 function _update(arg, newArg, db) { 45 (!arg || typeof arg !== "object") && (arg = {}); 46 return new Promise((resolve, reject) => { 47 db.update(arg, { $set: newArg }, {}, (error, numReplaced) => { 48 error && reject(`An error happened whiling handling find: ${error}`); 49 resolve(numReplaced); 50 }); 51 }); 52 }
144 async updateMany(query: object, data: Partial): Promise { 145 await this.model.sync(); 146 this.removeIdAndTimeStamps(data); 147 148 await this.model.update(data, { 149 where: query, 150 }); 151 }
66 update(query, dataToBeUpdate, opts){ 67 const dft = Object.assign({}, {multi: false, upsert: false}, opts) 68 return this.control.update(query, dataToBeUpdate, dft) 69 }