influxdb-1.1.2.1: Haskell client library for InfluxDB

Safe HaskellNone
LanguageHaskell2010

Database.InfluxDB.JSON

Synopsis

Documentation

parseResultsWith Source #

Arguments

:: (Maybe Text -> HashMap Text Text -> Vector Text -> Array -> Parser a)

A parser that takes

  1. an optional name of the series
  2. a map of tags
  3. an array of field names
  4. an array of values

to construct a value.

-> Value 
-> Parser (Vector a) 

Parse a JSON response

parseResultsWithDecoder Source #

Arguments

:: Decoder a 
-> (Maybe Text -> HashMap Text Text -> Vector Text -> Array -> Parser a)

A parser that takes

  1. an optional name of the series
  2. a map of tags
  3. an array of field names
  4. an array of values

to construct a value.

-> Value 
-> Parser (Vector a) 

Parse a JSON response with specified decoder settings.

data Decoder a Source #

Decoder settings

Constructors

Decoder 

Fields

strictDecoder :: Decoder a Source #

Fail immediately if there's any parse failure.

lenientDecoder :: Decoder a Source #

Ignore parse failures and return successful results.

getField Source #

Arguments

:: Text

Column name

-> Vector Text

Columns

-> Array

Fields

-> Parser Value 

Get a field value from a column name

getTag Source #

Arguments

:: Monad m 
=> Text

Tag name

-> HashMap Text Text

Tags

-> m Text 

Get a tag value from a tag name

parseTimestamp :: Precision ty -> Value -> Parser POSIXTime Source #

Parse either a POSIX timestamp or RFC3339 formatted timestamp.

parsePOSIXTime :: Precision ty -> Value -> Parser POSIXTime Source #

Parse an integer POSIX timestamp in given time precision.

parseRFC3339 :: ParseTime time => Value -> Parser time Source #

Parse a RFC3339-formatted timestamp.

Note that this parser is slow as it converts a Text input to a String before parsing.