Sha256: b03bf34e15e603b4737f1285d6cb2af186cc14349e265277a4c2d4a3ea8a2f03
Contents?: true
Size: 390 Bytes
Versions: 10
Compression:
Stored size: 390 Bytes
Contents
module ActiveReporter module Aggregator class Count < ActiveReporter::Aggregator::Base def function "COUNT(#{'DISTINCT' if distinct} #{expression})" end def default_value super || 0 end private def distinct opts[:distinct] || true end def column opts.fetch(:column, 'id') end end end end
Version data entries
10 entries across 10 versions & 1 rubygems