influxdb-1.6.0.7: Haskell client library for InfluxDB

Safe HaskellNone
LanguageHaskell2010

Database.InfluxDB.Query

Contents

Synopsis

Query interface

data Query Source #

An InfluxDB query.

A spec of the format is available at https://docs.influxdata.com/influxdb/v1.5/query_language/spec/.

A Query can be constructed using either

>>> :set -XOverloadedStrings
>>> "SELECT * FROM series" :: Query
"SELECT * FROM series"
>>> import qualified Database.InfluxDB.Format as F
>>> formatQuery ("SELECT * FROM "%F.key) "series"
"SELECT * FROM \"series\""

NOTE: Currently this library doesn't support type-safe query construction.

Instances
Show Query Source # 
Instance details

Defined in Database.InfluxDB.Types

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

IsString Query Source # 
Instance details

Defined in Database.InfluxDB.Types

Methods

fromString :: String -> Query #

query :: QueryResults a => QueryParams -> Query -> IO (Vector a) Source #

Query data from InfluxDB.

It may throw InfluxException.

If you need a lower-level interface (e.g. to bypass the QueryResults constraint etc), see withQueryResponse.

queryChunked Source #

Arguments

:: QueryResults a 
=> QueryParams 
-> Optional Int

Chunk size

By Default, InfluxDB chunks responses by series or by every 10,000 points, whichever occurs first. If it set to a Specific value, InfluxDB chunks responses by series or by that number of points.

-> Query 
-> FoldM IO (Vector a) r 
-> IO r 

Same as query but it instructs InfluxDB to stream chunked responses rather than returning a huge JSON object. This can be lot more efficient than query if the result is huge.

It may throw InfluxException.

If you need a lower-level interface (e.g. to bypass the QueryResults constraint etc), see withQueryResponse.

Query parameters

data QueryParams Source #

The full set of parameters for the query API

Instances
HasCredentials QueryParams Source #

Authentication info for the query

>>> let p = queryParams "foo"
>>> p ^. authentication
Nothing
>>> let p' = p & authentication ?~ credentials "john" "passw0rd"
>>> p' ^. authentication.traverse.user
"john"
Instance details

Defined in Database.InfluxDB.Query

HasManager QueryParams Source #
>>> let p = queryParams "foo" & manager .~ Left HC.defaultManagerSettings
Instance details

Defined in Database.InfluxDB.Query

HasDatabase QueryParams Source #
>>> let p = queryParams "foo"
>>> p ^. database
"foo"
Instance details

Defined in Database.InfluxDB.Query

HasServer QueryParams Source #
>>> let p = queryParams "foo"
>>> p ^. server.host
"localhost"
Instance details

Defined in Database.InfluxDB.Query

HasPrecision QueryRequest QueryParams Source #

Returning JSON responses contain timestamps in the specified precision/format.

>>> let p = queryParams "foo"
>>> p ^. precision
RFC3339
Instance details

Defined in Database.InfluxDB.Query

server :: HasServer a => Lens' a Server Source #

InfluxDB server address and port that to interact with.

database :: HasDatabase a => Lens' a Database Source #

Database name to work on.

precision :: HasPrecision ty a => Lens' a (Precision ty) Source #

Time precision parameter.

manager :: HasManager a => Lens' a (Either ManagerSettings Manager) Source #

HTTP manager settings or a manager itself.

If it's set to ManagerSettings, the library will create a Manager from the settings for you.

Parsing results

class QueryResults a where Source #

Types that can be converted from an JSON object returned by InfluxDB.

For example the h2o_feet series in the official document can be encoded as follows:

>>> :{
data H2OFeet = H2OFeet
  { time :: UTCTime
  , levelDesc :: T.Text
  , location :: T.Text
  , waterLevel :: Double
  }
instance QueryResults H2OFeet where
  parseResults prec = parseResultsWith $ \_ _ columns fields -> do
    time <- getField "time" columns fields >>= parseUTCTime prec
    levelDesc <- getField "level_description" columns fields >>= parseJSON
    location <- getField "location" columns fields >>= parseJSON
    waterLevel <- getField "water_level" columns fields >>= parseJSON
    return H2OFeet {..}
:}

Minimal complete definition

parseResults

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector a) Source #

Parse a JSON object as an array of values of expected type.

Instances
QueryResults Void Source # 
Instance details

Defined in Database.InfluxDB.Query

QueryResults ShowSeries Source # 
Instance details

Defined in Database.InfluxDB.Manage

QueryResults ShowQuery Source # 
Instance details

Defined in Database.InfluxDB.Manage

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2) => QueryResults (Tagged k1 v1, Tagged k2 v2) Source #

One-off tuple for sigle-field measurements

Instance details

Defined in Database.InfluxDB.Query

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3) Source #

One-off tuple for two-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3)) Source #

(KnownSymbol k, FromJSON v) => QueryResults (Tagged k v) Source #

One-off type for non-timestamped measurements

>>> let p = queryParams "_internal"
>>> dbs <- query p "SHOW DATABASES" :: IO (V.Vector (Tagged "name" T.Text))
>>> find ((== "_internal") . untag) dbs
Just (Tagged "_internal")
Instance details

Defined in Database.InfluxDB.Query

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4) Source #

One-off tuple for three-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5) Source #

One-off tuple for four-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5, KnownSymbol k6, FromJSON v6) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6) Source #

One-off tuple for five-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5, KnownSymbol k6, FromJSON v6, KnownSymbol k7, FromJSON v7) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7) Source #

One-off tuple for six-field measurement

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5, KnownSymbol k6, FromJSON v6, KnownSymbol k7, FromJSON v7, KnownSymbol k8, FromJSON v8) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7, Tagged k8 v8) Source #

One-off tuple for seven-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7, Tagged k8 v8)) Source #

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 with the lenientDecoder. This can be useful to implement the parseResults method.

Low-level functions

withQueryResponse Source #

Arguments

:: QueryParams 
-> Maybe (Optional Int)

Chunk size

By Nothing, InfluxDB returns all matching data points at once. By Just Default, InfluxDB chunks responses by series or by every 10,000 points, whichever occurs first. If it set to a Specific value, InfluxDB chunks responses by series or by that number of points.

-> Query 
-> (Request -> Response BodyReader -> IO r) 
-> IO r 

Lower-level interface to query data.

Re-exports from tagged

newtype Tagged (s :: k) b :: forall k. k -> * -> * #

A Tagged s b value is a value b with an attached phantom type s. This can be used in place of the more traditional but less safe idiom of passing in an undefined value with the type, because unlike an (s -> b), a Tagged s b can't try to use the argument s as a real value.

Moreover, you don't have to rely on the compiler to inline away the extra argument, because the newtype is "free"

Tagged has kind k -> * -> * if the compiler supports PolyKinds, therefore there is an extra k showing in the instance haddocks that may cause confusion.

Constructors

Tagged 

Fields

Instances
FunctorWithIndex () (Tagged a) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (() -> a0 -> b) -> Tagged a a0 -> Tagged a b #

imapped :: (Indexable () p, Settable f) => p a0 (f b) -> Tagged a a0 -> f (Tagged a b) #

FoldableWithIndex () (Tagged a) 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (() -> a0 -> m) -> Tagged a a0 -> m #

ifolded :: (Indexable () p, Contravariant f, Applicative f) => p a0 (f a0) -> Tagged a a0 -> f (Tagged a a0) #

ifoldr :: (() -> a0 -> b -> b) -> b -> Tagged a a0 -> b #

ifoldl :: (() -> b -> a0 -> b) -> b -> Tagged a a0 -> b #

ifoldr' :: (() -> a0 -> b -> b) -> b -> Tagged a a0 -> b #

ifoldl' :: (() -> b -> a0 -> b) -> b -> Tagged a a0 -> b #

TraversableWithIndex () (Tagged a) 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (() -> a0 -> f b) -> Tagged a a0 -> f (Tagged a b) #

itraversed :: (Indexable () p, Applicative f) => p a0 (f b) -> Tagged a a0 -> f (Tagged a b) #

ToJSON2 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> Tagged a b -> Value #

liftToJSONList2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> [Tagged a b] -> Value #

liftToEncoding2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> Tagged a b -> Encoding #

liftToEncodingList2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> [Tagged a b] -> Encoding #

FromJSON2 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Tagged a b) #

liftParseJSONList2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Tagged a b] #

Bitraversable (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Tagged a b -> f (Tagged c d) #

Bifoldable (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

bifold :: Monoid m => Tagged m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Tagged a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Tagged a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Tagged a b -> c #

Bifunctor (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

bimap :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d #

first :: (a -> b) -> Tagged a c -> Tagged b c #

second :: (b -> c) -> Tagged a b -> Tagged a c #

Eq2 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Tagged a c -> Tagged b d -> Bool #

Ord2 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Tagged a c -> Tagged b d -> Ordering #

Read2 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Tagged a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Tagged a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Tagged a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Tagged a b] #

Show2 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Tagged

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Tagged a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Tagged a b] -> ShowS #

Profunctor (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Tagged b c -> Tagged a d #

lmap :: (a -> b) -> Tagged b c -> Tagged a c #

rmap :: (b -> c) -> Tagged a b -> Tagged a c #

(#.) :: Coercible c b => q b c -> Tagged a b -> Tagged a c #

(.#) :: Coercible b a => Tagged b c -> q a b -> Tagged a c #

Bitraversable1 (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Tagged a c -> f (Tagged b d) #

bisequence1 :: Apply f => Tagged (f a) (f b) -> f (Tagged a b) #

Corepresentable (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep Tagged :: * -> * #

Methods

cotabulate :: (Corep Tagged d -> c) -> Tagged d c #

Choice (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Tagged a b -> Tagged (Either a c) (Either b c) #

right' :: Tagged a b -> Tagged (Either c a) (Either c b) #

Generic1 (Tagged s :: * -> *) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep1 (Tagged s) :: k -> * #

Methods

from1 :: Tagged s a -> Rep1 (Tagged s) a #

to1 :: Rep1 (Tagged s) a -> Tagged s a #

Monad (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

(>>=) :: Tagged s a -> (a -> Tagged s b) -> Tagged s b #

(>>) :: Tagged s a -> Tagged s b -> Tagged s b #

return :: a -> Tagged s a #

fail :: String -> Tagged s a #

Functor (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fmap :: (a -> b) -> Tagged s a -> Tagged s b #

(<$) :: a -> Tagged s b -> Tagged s a #

Applicative (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

pure :: a -> Tagged s a #

(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b #

liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c #

(*>) :: Tagged s a -> Tagged s b -> Tagged s b #

(<*) :: Tagged s a -> Tagged s b -> Tagged s a #

Foldable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fold :: Monoid m => Tagged s m -> m #

foldMap :: Monoid m => (a -> m) -> Tagged s a -> m #

foldr :: (a -> b -> b) -> b -> Tagged s a -> b #

foldr' :: (a -> b -> b) -> b -> Tagged s a -> b #

foldl :: (b -> a -> b) -> b -> Tagged s a -> b #

foldl' :: (b -> a -> b) -> b -> Tagged s a -> b #

foldr1 :: (a -> a -> a) -> Tagged s a -> a #

foldl1 :: (a -> a -> a) -> Tagged s a -> a #

toList :: Tagged s a -> [a] #

null :: Tagged s a -> Bool #

length :: Tagged s a -> Int #

elem :: Eq a => a -> Tagged s a -> Bool #

maximum :: Ord a => Tagged s a -> a #

minimum :: Ord a => Tagged s a -> a #

sum :: Num a => Tagged s a -> a #

product :: Num a => Tagged s a -> a #

Traversable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

traverse :: Applicative f => (a -> f b) -> Tagged s a -> f (Tagged s b) #

sequenceA :: Applicative f => Tagged s (f a) -> f (Tagged s a) #

mapM :: Monad m => (a -> m b) -> Tagged s a -> m (Tagged s b) #

sequence :: Monad m => Tagged s (m a) -> m (Tagged s a) #

Representable (Tagged t) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Tagged t) :: * #

Methods

tabulate :: (Rep (Tagged t) -> a) -> Tagged t a #

index :: Tagged t a -> Rep (Tagged t) -> a #

ToJSON1 (Tagged a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a0 -> Value) -> ([a0] -> Value) -> Tagged a a0 -> Value #

liftToJSONList :: (a0 -> Value) -> ([a0] -> Value) -> [Tagged a a0] -> Value #

liftToEncoding :: (a0 -> Encoding) -> ([a0] -> Encoding) -> Tagged a a0 -> Encoding #

liftToEncodingList :: (a0 -> Encoding) -> ([a0] -> Encoding) -> [Tagged a a0] -> Encoding #

FromJSON1 (Tagged a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser (Tagged a a0) #

liftParseJSONList :: (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser [Tagged a a0] #

Eq1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftEq :: (a -> b -> Bool) -> Tagged s a -> Tagged s b -> Bool #

Ord1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftCompare :: (a -> b -> Ordering) -> Tagged s a -> Tagged s b -> Ordering #

Read1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Tagged s a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Tagged s a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Tagged s a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Tagged s a] #

Show1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Tagged s a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Tagged s a] -> ShowS #

Traversable1 (Tagged a) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a0 -> f b) -> Tagged a a0 -> f (Tagged a b) #

sequence1 :: Apply f => Tagged a (f b) -> f (Tagged a b) #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2) => QueryResults (Tagged k1 v1, Tagged k2 v2) Source #

One-off tuple for sigle-field measurements

Instance details

Defined in Database.InfluxDB.Query

Bounded b => Bounded (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

minBound :: Tagged s b #

maxBound :: Tagged s b #

Enum a => Enum (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

succ :: Tagged s a -> Tagged s a #

pred :: Tagged s a -> Tagged s a #

toEnum :: Int -> Tagged s a #

fromEnum :: Tagged s a -> Int #

enumFrom :: Tagged s a -> [Tagged s a] #

enumFromThen :: Tagged s a -> Tagged s a -> [Tagged s a] #

enumFromTo :: Tagged s a -> Tagged s a -> [Tagged s a] #

enumFromThenTo :: Tagged s a -> Tagged s a -> Tagged s a -> [Tagged s a] #

Eq b => Eq (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

(==) :: Tagged s b -> Tagged s b -> Bool #

(/=) :: Tagged s b -> Tagged s b -> Bool #

Floating a => Floating (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

pi :: Tagged s a #

exp :: Tagged s a -> Tagged s a #

log :: Tagged s a -> Tagged s a #

sqrt :: Tagged s a -> Tagged s a #

(**) :: Tagged s a -> Tagged s a -> Tagged s a #

logBase :: Tagged s a -> Tagged s a -> Tagged s a #

sin :: Tagged s a -> Tagged s a #

cos :: Tagged s a -> Tagged s a #

tan :: Tagged s a -> Tagged s a #

asin :: Tagged s a -> Tagged s a #

acos :: Tagged s a -> Tagged s a #

atan :: Tagged s a -> Tagged s a #

sinh :: Tagged s a -> Tagged s a #

cosh :: Tagged s a -> Tagged s a #

tanh :: Tagged s a -> Tagged s a #

asinh :: Tagged s a -> Tagged s a #

acosh :: Tagged s a -> Tagged s a #

atanh :: Tagged s a -> Tagged s a #

log1p :: Tagged s a -> Tagged s a #

expm1 :: Tagged s a -> Tagged s a #

log1pexp :: Tagged s a -> Tagged s a #

log1mexp :: Tagged s a -> Tagged s a #

Fractional a => Fractional (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(/) :: Tagged s a -> Tagged s a -> Tagged s a #

recip :: Tagged s a -> Tagged s a #

fromRational :: Rational -> Tagged s a #

Integral a => Integral (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

quot :: Tagged s a -> Tagged s a -> Tagged s a #

rem :: Tagged s a -> Tagged s a -> Tagged s a #

div :: Tagged s a -> Tagged s a -> Tagged s a #

mod :: Tagged s a -> Tagged s a -> Tagged s a #

quotRem :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

divMod :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

toInteger :: Tagged s a -> Integer #

(Data s, Data b) => Data (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Tagged s b -> c (Tagged s b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tagged s b) #

toConstr :: Tagged s b -> Constr #

dataTypeOf :: Tagged s b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tagged s b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tagged s b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Tagged s b -> Tagged s b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tagged s b -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tagged s b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Tagged s b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Tagged s b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tagged s b -> m (Tagged s b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged s b -> m (Tagged s b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged s b -> m (Tagged s b) #

Num a => Num (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(+) :: Tagged s a -> Tagged s a -> Tagged s a #

(-) :: Tagged s a -> Tagged s a -> Tagged s a #

(*) :: Tagged s a -> Tagged s a -> Tagged s a #

negate :: Tagged s a -> Tagged s a #

abs :: Tagged s a -> Tagged s a #

signum :: Tagged s a -> Tagged s a #

fromInteger :: Integer -> Tagged s a #

Ord b => Ord (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

compare :: Tagged s b -> Tagged s b -> Ordering #

(<) :: Tagged s b -> Tagged s b -> Bool #

(<=) :: Tagged s b -> Tagged s b -> Bool #

(>) :: Tagged s b -> Tagged s b -> Bool #

(>=) :: Tagged s b -> Tagged s b -> Bool #

max :: Tagged s b -> Tagged s b -> Tagged s b #

min :: Tagged s b -> Tagged s b -> Tagged s b #

Read b => Read (Tagged s b) 
Instance details

Defined in Data.Tagged

Real a => Real (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

toRational :: Tagged s a -> Rational #

RealFloat a => RealFloat (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

floatRadix :: Tagged s a -> Integer #

floatDigits :: Tagged s a -> Int #

floatRange :: Tagged s a -> (Int, Int) #

decodeFloat :: Tagged s a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Tagged s a #

exponent :: Tagged s a -> Int #

significand :: Tagged s a -> Tagged s a #

scaleFloat :: Int -> Tagged s a -> Tagged s a #

isNaN :: Tagged s a -> Bool #

isInfinite :: Tagged s a -> Bool #

isDenormalized :: Tagged s a -> Bool #

isNegativeZero :: Tagged s a -> Bool #

isIEEE :: Tagged s a -> Bool #

atan2 :: Tagged s a -> Tagged s a -> Tagged s a #

RealFrac a => RealFrac (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

properFraction :: Integral b => Tagged s a -> (b, Tagged s a) #

truncate :: Integral b => Tagged s a -> b #

round :: Integral b => Tagged s a -> b #

ceiling :: Integral b => Tagged s a -> b #

floor :: Integral b => Tagged s a -> b #

Show b => Show (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

showsPrec :: Int -> Tagged s b -> ShowS #

show :: Tagged s b -> String #

showList :: [Tagged s b] -> ShowS #

Ix b => Ix (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

range :: (Tagged s b, Tagged s b) -> [Tagged s b] #

index :: (Tagged s b, Tagged s b) -> Tagged s b -> Int #

unsafeIndex :: (Tagged s b, Tagged s b) -> Tagged s b -> Int

inRange :: (Tagged s b, Tagged s b) -> Tagged s b -> Bool #

rangeSize :: (Tagged s b, Tagged s b) -> Int #

unsafeRangeSize :: (Tagged s b, Tagged s b) -> Int

IsString a => IsString (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

fromString :: String -> Tagged s a #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: * -> * #

Methods

from :: Tagged s b -> Rep (Tagged s b) x #

to :: Rep (Tagged s b) x -> Tagged s b #

Semigroup a => Semigroup (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(<>) :: Tagged s a -> Tagged s a -> Tagged s a #

sconcat :: NonEmpty (Tagged s a) -> Tagged s a #

stimes :: Integral b => b -> Tagged s a -> Tagged s a #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a #

mappend :: Tagged s a -> Tagged s a -> Tagged s a #

mconcat :: [Tagged s a] -> Tagged s a #

ToJSON b => ToJSON (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Tagged a b -> Value #

toEncoding :: Tagged a b -> Encoding #

toJSONList :: [Tagged a b] -> Value #

toEncodingList :: [Tagged a b] -> Encoding #

ToJSONKey b => ToJSONKey (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON b => FromJSON (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Tagged a b) #

parseJSONList :: Value -> Parser [Tagged a b] #

FromJSONKey b => FromJSONKey (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Storable a => Storable (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

sizeOf :: Tagged s a -> Int #

alignment :: Tagged s a -> Int #

peekElemOff :: Ptr (Tagged s a) -> Int -> IO (Tagged s a) #

pokeElemOff :: Ptr (Tagged s a) -> Int -> Tagged s a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Tagged s a) #

pokeByteOff :: Ptr b -> Int -> Tagged s a -> IO () #

peek :: Ptr (Tagged s a) -> IO (Tagged s a) #

poke :: Ptr (Tagged s a) -> Tagged s a -> IO () #

Bits a => Bits (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(.&.) :: Tagged s a -> Tagged s a -> Tagged s a #

(.|.) :: Tagged s a -> Tagged s a -> Tagged s a #

xor :: Tagged s a -> Tagged s a -> Tagged s a #

complement :: Tagged s a -> Tagged s a #

shift :: Tagged s a -> Int -> Tagged s a #

rotate :: Tagged s a -> Int -> Tagged s a #

zeroBits :: Tagged s a #

bit :: Int -> Tagged s a #

setBit :: Tagged s a -> Int -> Tagged s a #

clearBit :: Tagged s a -> Int -> Tagged s a #

complementBit :: Tagged s a -> Int -> Tagged s a #

testBit :: Tagged s a -> Int -> Bool #

bitSizeMaybe :: Tagged s a -> Maybe Int #

bitSize :: Tagged s a -> Int #

isSigned :: Tagged s a -> Bool #

shiftL :: Tagged s a -> Int -> Tagged s a #

unsafeShiftL :: Tagged s a -> Int -> Tagged s a #

shiftR :: Tagged s a -> Int -> Tagged s a #

unsafeShiftR :: Tagged s a -> Int -> Tagged s a #

rotateL :: Tagged s a -> Int -> Tagged s a #

rotateR :: Tagged s a -> Int -> Tagged s a #

popCount :: Tagged s a -> Int #

FiniteBits a => FiniteBits (Tagged s a) 
Instance details

Defined in Data.Tagged

NFData b => NFData (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

rnf :: Tagged s b -> () #

Wrapped (Tagged s a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Tagged s a) :: * #

Methods

_Wrapped' :: Iso' (Tagged s a) (Unwrapped (Tagged s a)) #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3) Source #

One-off tuple for two-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3)) Source #

(KnownSymbol k, FromJSON v) => QueryResults (Tagged k v) Source #

One-off type for non-timestamped measurements

>>> let p = queryParams "_internal"
>>> dbs <- query p "SHOW DATABASES" :: IO (V.Vector (Tagged "name" T.Text))
>>> find ((== "_internal") . untag) dbs
Just (Tagged "_internal")
Instance details

Defined in Database.InfluxDB.Query

t ~ Tagged s' a' => Rewrapped (Tagged s a) t 
Instance details

Defined in Control.Lens.Wrapped

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4) Source #

One-off tuple for three-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5) Source #

One-off tuple for four-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5, KnownSymbol k6, FromJSON v6) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6) Source #

One-off tuple for five-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5, KnownSymbol k6, FromJSON v6, KnownSymbol k7, FromJSON v7) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7) Source #

One-off tuple for six-field measurement

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7)) Source #

(KnownSymbol k1, FromJSON v1, KnownSymbol k2, FromJSON v2, KnownSymbol k3, FromJSON v3, KnownSymbol k4, FromJSON v4, KnownSymbol k5, FromJSON v5, KnownSymbol k6, FromJSON v6, KnownSymbol k7, FromJSON v7, KnownSymbol k8, FromJSON v8) => QueryResults (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7, Tagged k8 v8) Source #

One-off tuple for seven-field measurements

Instance details

Defined in Database.InfluxDB.Query

Methods

parseResults :: Precision QueryRequest -> Value -> Parser (Vector (Tagged k1 v1, Tagged k2 v2, Tagged k3 v3, Tagged k4 v4, Tagged k5 v5, Tagged k6 v6, Tagged k7 v7, Tagged k8 v8)) Source #

type Corep (Tagged :: * -> * -> *) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Tagged :: * -> * -> *) = (Proxy :: * -> *)
type Rep1 (Tagged s :: * -> *) 
Instance details

Defined in Data.Tagged

type Rep1 (Tagged s :: * -> *) = D1 (MetaData "Tagged" "Data.Tagged" "tagged-0.8.6-8akQ1aZG2N2GFJpoB5eGXO" True) (C1 (MetaCons "Tagged" PrefixI True) (S1 (MetaSel (Just "unTagged") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))
type Rep (Tagged t) 
Instance details

Defined in Data.Functor.Rep

type Rep (Tagged t) = ()
type Rep (Tagged s b) 
Instance details

Defined in Data.Tagged

type Rep (Tagged s b) = D1 (MetaData "Tagged" "Data.Tagged" "tagged-0.8.6-8akQ1aZG2N2GFJpoB5eGXO" True) (C1 (MetaCons "Tagged" PrefixI True) (S1 (MetaSel (Just "unTagged") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 b)))
type Unwrapped (Tagged s a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Tagged s a) = a

untag :: Tagged s b -> b #

Alias for unTagged