MCPcopy
hub / github.com/sequelize/sequelize / previous

Method previous

lib/model.js:3796–3802  ·  view source on GitHub ↗

* Returns the previous value for key from `_previousDataValues`. * * If called without a key, returns the previous values for all values which have changed * * @param {string} [key] key to get previous value of * * @returns {any|Array<any>}

(key)

Source from the content-addressed store, hash-verified

3794 * @returns {any|Array<any>}
3795 */
3796 previous(key) {
3797 if (key) {
3798 return this._previousDataValues[key];
3799 }
3800
3801 return _.pickBy(this._previousDataValues, (value, key) => this.changed(key));
3802 }
3803
3804 _setInclude(key, value, options) {
3805 if (!Array.isArray(value)) value = [value];

Callers 3

model.tsFile · 0.80
values.test.jsFile · 0.80
previous.test.jsFile · 0.80

Calls 1

changedMethod · 0.95

Tested by

no test coverage detected