Class: ActiveReporter::Aggregator::Array
- Defined in:
- lib/active_reporter/aggregator/array.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#default_value, #initialize, #sql_value_name
Constructor Details
This class inherits a constructor from ActiveReporter::Aggregator::Base
Instance Method Details
#aggregate(groups) ⇒ Object
6 7 8 9 10 |
# File 'lib/active_reporter/aggregator/array.rb', line 6 def aggregate(groups) fail InvalidParamsError, "array aggregator is only supported in Postgres" unless ActiveReporter.database_type == :postgres super end |
#function ⇒ Object
12 13 14 |
# File 'lib/active_reporter/aggregator/array.rb', line 12 def function "ARRAY_AGG(#{expression})" end |