ExTeal.Metric.Ranges (ExTeal v0.21.0) View Source
Helper functions for building time intervals and queries based on the params of a request.
Link to this section Summary
Link to this section Types
Specs
between_options() :: [ start_dt: DateTime.t(), end_dt: DateTime.t(), metric: module() ]
Link to this section Functions
Specs
between(Ecto.Queryable.t(), between_options()) :: Ecto.Queryable.t()
Set the boundaries of an aggregate queries
Specs
get_aggregate_datetimes(request :: ExTeal.Metric.Request.t()) :: {start_dt :: DateTime.t(), end_dt :: DateTime.t()}
Parse the start and end params
Specs
parse_dt(String.t(), String.t(), String.t()) :: DateTime.t()