View Source Luminous.Query behaviour (luminous v1.4.2)
A query is embedded in a panel and contains a function which will be executed upon panel refresh to fetch the query's data.
Link to this section Summary
Callbacks
A module must implement this behaviour to be passed as an argument to Luminous.Query.define/2
.
A query must return a list of 2-tuples
Functions
Initialize a query at compile time. The module must implement the Luminous.Query
behaviour.
Execute the query and return the data as multiple TimeSeries structs.
Link to this section Types
Link to this section Callbacks
@callback query(atom(), Luminous.TimeRange.t(), [Luminous.Variable.t()]) :: Luminous.Query.Result.t()
A module must implement this behaviour to be passed as an argument to Luminous.Query.define/2
.
A query must return a list of 2-tuples:
- the 2-tuple's first element is the time series' label
- the 2-tuple's second element is the label's value
the list must contain a 2-tuple with the label
:time
and aDateTime
value.
Link to this section Functions
Initialize a query at compile time. The module must implement the Luminous.Query
behaviour.
@spec execute(t(), Luminous.TimeRange.t(), [Luminous.Variable.t()]) :: Luminous.Query.Result.t()
Execute the query and return the data as multiple TimeSeries structs.