View Source Luminous.Query.Result (luminous v1.2.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 for details.

Link to this section Summary


This function can be called in the following ways

Link to this section Types

@type label() :: atom() | binary()
@type point() :: {label(), value()}
@type row() :: [point()] | map()
@type t() :: %Luminous.Query.Result{
  attrs: %{required(binary()) => Luminous.Query.Attributes.t()},
  rows: row()
@type value() :: number() | Decimal.t() | binary() | nil

Link to this section Functions

@spec new([row()] | row() | point() | value(), Keyword.t()) :: t()

This function 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)