class ActiveReporter::Aggregator::Count
Public Instance Methods
default_value()
click to toggle source
Calls superclass method
ActiveReporter::Aggregator::Base#default_value
# File lib/active_reporter/aggregator/count.rb, line 8 def default_value super || 0 end
function()
click to toggle source
# File lib/active_reporter/aggregator/count.rb, line 4 def function "COUNT(#{'DISTINCT' if distinct} #{expression})" end
Private Instance Methods
column()
click to toggle source
# File lib/active_reporter/aggregator/count.rb, line 18 def column opts.fetch(:column, 'id') end
distinct()
click to toggle source
# File lib/active_reporter/aggregator/count.rb, line 14 def distinct opts[:distinct] || true end