View Source Luminous.Query.Result (luminous v0.1.0)
a query Result wraps a columnar data frame with multiple variables
attrs
is a map where keys are variable labels (as specified
in the query's select statement) and values are keyword lists with
visualization properties for the corresponding Dataset. See
Dataset.new/3 for details.
Link to this section Summary
Functions
new/2 can be called in the following ways
transform the query Result (multiple variables as columns) to a list of Datasets timestamps are converted to unix time in milliseconds (js-compatible)
Link to this section Types
@type row() :: [point()]
@type t() :: %Luminous.Query.Result{ attrs: %{required(binary()) => Luminous.Query.Attributes.t()}, rows: row() }
Link to this section Functions
new/2 can be called in the following ways:
- with a list of rows, i.e. a list of lists containing 2-tuples {label, value}
- with a single row, i.e. a list of 2-tuples of the form {label, value} (e.g. in the case of single- or multi- stats)
- with a single value (for use in a single-valued stat panel with no label)
@spec transform(t()) :: [Luminous.Query.DataSet.t()]
transform the query Result (multiple variables as columns) to a list of Datasets timestamps are converted to unix time in milliseconds (js-compatible)