MCPcopy
hub / github.com/sequelize/sequelize / setDataValue

Method setDataValue

lib/model.js:3493–3501  ·  lib/model.js::Model.setDataValue

* Update the underlying data value * * @param {string} key key to set in instance data store * @param {any} value new value for given key *

(key, value)

Source from the content-addressed store, hash-verified

3491 *
3492 */
3493 setDataValue(key, value) {
3494 const originalValue = this._previousDataValues[key];
3495
3496 if (!_.isEqual(value, originalValue)) {
3497 this.changed(key, true);
3498 }
3499
3500 this.dataValues[key] = value;
3501 }
3502
3503 /**
3504 * If no key is given, returns all values of the instance, also invoking virtual getters.

Callers 15

destroyMethod · 0.95
restoreMethod · 0.95
setFunction · 0.80
updateMethod · 0.80
setFunction · 0.80
setFunction · 0.80
price1Function · 0.80
setFunction · 0.80
setFunction · 0.80
setFunction · 0.80
setFunction · 0.80

Calls 1

changedMethod · 0.95

Tested by 10

setFunction · 0.64
setFunction · 0.64
price1Function · 0.64
setFunction · 0.64
setFunction · 0.64
setFunction · 0.64
setFunction · 0.64
setFunction · 0.64
setFunction · 0.64
setFunction · 0.64