Module: Groupdate

Defined in:
lib/groupdate.rb,
lib/groupdate/magic.rb,
lib/groupdate/version.rb,
lib/groupdate/relation.rb,
lib/groupdate/query_methods.rb,
lib/groupdate/series_builder.rb,
lib/groupdate/relation_builder.rb

Defined Under Namespace

Modules: QueryMethods, Relation Classes: Error, Magic, RelationBuilder, SeriesBuilder

Constant Summary collapse

PERIODS =
[:second, :minute, :hour, :day, :week, :month, :quarter, :year, :day_of_week, :hour_of_day, :minute_of_hour, :day_of_month, :month_of_year]
METHODS =
PERIODS.map { |v| :"group_by_#{v}" } + [:group_by_period]
VERSION =
"4.1.2"

Class Method Summary collapse

Class Method Details

.process_result(relation, result, **options) ⇒ Object

api for gems like ActiveMedian


20
21
22
23
24
25
# File 'lib/groupdate.rb', line 20

def self.process_result(relation, result, **options)
  if relation.groupdate_values
    result = Groupdate::Magic::Relation.process_result(relation, result, **options)
  end
  result
end