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
4 5 6 7 |
# File 'lib/active_reporter/aggregator/array.rb', line 4 def aggregate(groups) fail InvalidParamsError, 'array agg is only supported in Postgres' unless ActiveReporter.database_type == :postgres super end |
#function ⇒ Object
9 10 11 |
# File 'lib/active_reporter/aggregator/array.rb', line 9 def function "ARRAY_AGG(#{expression})" end |