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

Commit b30e4980 by Benjamin August

distinct option for count

1 parent 33727829
Showing with 6 additions and 0 deletions
......@@ -614,6 +614,12 @@ module.exports = (function() {
[this.sequelize.fn('COUNT', col), 'count']
]
if(options.distinct) {
options.attributes = [
[this.sequelize.fn('COUNT', this.sequelize.fn('DISTINCT', col) ), 'count']
]
}
options.includeIgnoreAttributes = false
options.limit = null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!