View Source ExTeal.Metric.TrendExpression behaviour (ExTeal v0.28.1)
Behaviour for trend expression builders
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.
Types
Callbacks
@callback 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.
Functions
@spec fetch_offset(timezone :: String.t(), datetime :: DateTime.t()) :: float()