Instream v0.12.0 Instream.Encoder.InfluxQL
Encoder module for InfluxQL.
Summary
Functions
Converts a query builder struct to InfluxQL
Quotes an identifier if necessary
Quotes a value in a query
Functions
Specs
encode(Instream.Query.Builder.t) :: String.t
Converts a query builder struct to InfluxQL.
Quotes an identifier if necessary.
Examples
iex> quote_identifier("unquoted")
"unquoted"
iex> quote_identifier("_unquoted")
"_unquoted"
iex> quote_identifier("100quotes")
"\"100quotes\""
iex> quote_identifier("quotes for whitespace")
"\"quotes for whitespace\""
iex> quote_identifier("dáshes-and.stüff")
"\"dáshes-and.stüff\""
Specs
quote_value(any) :: String.t
Quotes a value in a query.
Examples
iex> quote_value(100)
"100"
iex> quote_value(:foo)
"foo"
iex> quote_value("stringy")
"'stringy'"