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

Method setDataValue

src/model.js:3619–3627  ·  view source on GitHub ↗

* 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

3617 *
3618 */
3619 setDataValue(key, value) {
3620 const originalValue = this._previousDataValues[key];
3621
3622 if (!_.isEqual(value, originalValue)) {
3623 this.changed(key, true);
3624 }
3625
3626 this.dataValues[key] = value;
3627 }
3628
3629 /**
3630 * 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
setFunction · 0.80
price1Function · 0.80
setFunction · 0.80
setFunction · 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