MCPcopy
hub / github.com/sequelize/sequelize / sum

Method sum

lib/model.js:2156–2158  ·  view source on GitHub ↗

* Find the sum of field * * @param {string} field attribute / field name * @param {object} [options] See aggregate * * @see * {@link Model.aggregate} for options * * @returns {Promise<number>}

(field, options)

Source from the content-addressed store, hash-verified

2154 * @returns {Promise<number>}
2155 */
2156 static async sum(field, options) {
2157 return await this.aggregate(field, 'sum', options);
2158 }
2159
2160 /**
2161 * Builds a new model instance.

Callers 4

model.test.jsFile · 0.80
notExist.test.jsFile · 0.80
sum.test.jsFile · 0.80
field.test.jsFile · 0.80

Calls 1

aggregateMethod · 0.95

Tested by

no test coverage detected