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