InfluxElixir.Client.Local.SQLRow (InfluxElixir v0.1.40)

Copy Markdown View Source

How a stored point's columns read in a SQL query of InfluxElixir.Client.Local: the value a column has, and the value a point sorts, groups and picks on.

Summary

Types

A stored point, as InfluxElixir.Client.Local keeps it.

Functions

A column as a row carries it: time as a DateTime, a tag or field as stored. A tag wins over a field of the same name; false is a value, not a missing one. A CTE column named time that is not a timestamp is a field and is read as one.

The instant ns nanoseconds after the epoch as a DateTime, or nil.

What a point sorts, groups and picks on for a column: time by its stored nanoseconds (a DateTime has only microseconds), anything else by its value. A null sorts last ascending and first descending.

Types

point()

A stored point, as InfluxElixir.Client.Local keeps it.

Functions

column_value(point, column)

@spec column_value(point(), binary()) :: term()

A column as a row carries it: time as a DateTime, a tag or field as stored. A tag wins over a field of the same name; false is a value, not a missing one. A CTE column named time that is not a timestamp is a field and is read as one.

nanoseconds_to_datetime(ns)

@spec nanoseconds_to_datetime(integer() | nil) :: DateTime.t() | nil

The instant ns nanoseconds after the epoch as a DateTime, or nil.

sort_value(point, column)

@spec sort_value(point(), binary()) :: term()

What a point sorts, groups and picks on for a column: time by its stored nanoseconds (a DateTime has only microseconds), anything else by its value. A null sorts last ascending and first descending.