ExTeal.Metric.TrendExpression behaviour (ExTeal v0.21.0) View Source
Behaviour for trend expression builders
Link to this section Summary
Callbacks
Use database specifc syntax to build an expression for both selecting
and grouping by a given unit of time. The function uses select_merge
to
build a date_result value assuming that a previous select has been used to
generate a query for the aggregate.
Link to this section Types
Specs
Link to this section Callbacks
Specs
generate( query :: Ecto.Queryable.t(), metric :: module(), timezone :: String.t(), unit :: String.t(), start_dt :: DateTime.t() ) :: Ecto.Queryable.t()
Use database specifc syntax to build an expression for both selecting
and grouping by a given unit of time. The function uses select_merge
to
build a date_result value assuming that a previous select has been used to
generate a query for the aggregate.
Link to this section Functions
Specs
fetch_offset(timezone :: String.t(), datetime :: DateTime.t()) :: float()