不要怂,就是干,撸起袖子干!

Commit 8d7c0703 by Jan Aagaard Meier

[ci skip] Add options.where to count and aggregate

1 parent 745ac51d
Showing with 2 additions and 0 deletions
......@@ -787,6 +787,7 @@ module.exports = (function() {
* @param {String} field The field to aggregate over. Can be a field name or *
* @param {String} aggregateFunction The function to use for aggregation, e.g. sum, max etc.
* @param {Object} [options] Query options. See sequelize.query for full options
* @param {Object} [options.where] A hash of search attributes.
* @param {DataType|String} [options.dataType] The type of the result. If `field` is a field in this Model, the default will be the type of that field, otherwise defaults to float.
* @param {boolean} [options.distinct] Applies DISTINCT to the field being aggregated over
* @param {Transaction} [options.transaction]
......@@ -822,6 +823,7 @@ module.exports = (function() {
* If you provide an `include` option, the number of matching associations will be counted instead.
*
* @param {Object} [options]
* @param {Object} [options.where] A hash of search attributes.
* @param {Object} [options.include] Include options. See `find` for details
* @param {boolean} [options.distinct] Appliy COUNT(DISTINCT(col))
*
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!