Class: ActiveReporter::Aggregator::Count
- Defined in:
- lib/active_reporter/aggregator/count.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#aggregate, #initialize, #sql_value_name
Constructor Details
This class inherits a constructor from ActiveReporter::Aggregator::Base
Instance Method Details
#default_value ⇒ Object
8 9 10 |
# File 'lib/active_reporter/aggregator/count.rb', line 8 def default_value super || 0 end |
#function ⇒ Object
4 5 6 |
# File 'lib/active_reporter/aggregator/count.rb', line 4 def function "COUNT(#{'DISTINCT' if distinct} #{expression})" end |