packages feed

influxdb 1.6.1.3 → 1.7.0

raw patch · 5 files changed

+32/−26 lines, 5 filesdep ~basedep ~clockdep ~networkPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, clock, network

API changes (from Hackage documentation)

- Database.InfluxDB: getField :: Monad m => Text -> Vector Text -> Vector Value -> m Value
+ Database.InfluxDB: getField :: MonadFail m => Text -> Vector Text -> Vector Value -> m Value
- Database.InfluxDB: getTag :: Monad m => Text -> HashMap Text Value -> m Value
+ Database.InfluxDB: getTag :: MonadFail m => Text -> HashMap Text Value -> m Value
- Database.InfluxDB.JSON: getField :: Monad m => Text -> Vector Text -> Vector Value -> m Value
+ Database.InfluxDB.JSON: getField :: MonadFail m => Text -> Vector Text -> Vector Value -> m Value
- Database.InfluxDB.JSON: getTag :: Monad m => Text -> HashMap Text Value -> m Value
+ Database.InfluxDB.JSON: getTag :: MonadFail m => Text -> HashMap Text Value -> m Value

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for influxdb +## v1.7.0 - 2019-05-03++* Support GHC 8.8.1-alpha1+  * The types of `getField` and `getTag` have changed+* Relax upper version bounds for clock and network+ ## v1.6.1.3 - 2019-03-26  * Drop unused dependency on QuickCheck@@ -94,7 +100,7 @@  * Relax upper version bound for base ([#51](https://github.com/maoe/influxdb-haskell/pull/51)) * Implement proper escaping and quoting for special characters ([#51](https://github.com/maoe/influxdb-haskell/pull/51), [#52](https://github.com/maoe/influxdb-haskell/pull/52))-    * Introduce the Measurement type and accompanying functions+  * Introduce the Measurement type and accompanying functions * Fix a bug in the HTTP writer where the precision parameter is ignored when constructing requests * Some minor doctest fixes @@ -127,8 +133,8 @@ * The `FieldVal` has been renamed to `Field` which takes `Nullability` as a type parameter. * `localServer` has been renamed to `defaultServer` * Some constructors in `InfluxException` have been renamed-    * `BadRequest` to `ClientError`-    * `IllformedJSON` to `UnexpectedResponse`+  * `BadRequest` to `ClientError`+  * `IllformedJSON` to `UnexpectedResponse` * Added a smart constructor `credentials` for `Credentials` * Dropped `parseTimestamp` and added `parseUTCTime` * `ping` handles timeout proerply and throws `InfluxException` on failure@@ -189,7 +195,7 @@ * Add `writeSeriesData` * Relax upper version bound for exceptions * Drop support for old retry package-    * retry < 0.6 had an unexpected behavior wrt exception masking state (https://github.com/Soostone/retry/pull/12)+  * retry < 0.6 had an unexpected behavior wrt exception masking state (https://github.com/Soostone/retry/pull/12)  ## v0.9.0.1 - 2015-01-06 @@ -204,7 +210,7 @@ ## v0.8.0 - 2014-11-07  * Retry on connection failure and response timeout in addition to IOException-    * Note that this may break existing code silently+  * Note that this may break existing code silently  ## v0.7.1.1 - 2014-09-19 @@ -218,15 +224,15 @@ ## v0.7.0 - 2014-09-12  * Support for influxdb v0.8 (#15)-    * Add shard spaces API-    * Add `configureDatabase`+  * Add shard spaces API+  * Add `configureDatabase` * Add Typeable and Generic instances where missing * Remove unused `ScheduledDelete` type  ## v0.6.0 - 2014-08-19  * Support for retry-0.5 (#16)-    * `newServerPoolWithRetrySettings` has been renamed to `newServerPoolWithRetryPolicy`+  * `newServerPoolWithRetrySettings` has been renamed to `newServerPoolWithRetryPolicy`     * `serverRetrySettings` field in `ServerPool` has been renamed to `serverRetryPolicy` * Support for network-uri (#17) @@ -238,9 +244,9 @@  * Add `InfluxException` type and use it when decoding JSON or SeriesData (#12) * New API-    * `ping`-    * `listInterfaces`-    * `isInSync`+  * `ping`+  * `listInterfaces`+  * `isInSync` * BUGFIX: Fix `when expecting a Float, encountered Int instead` error (#14)  ## v0.4.2 - 2014-06-06@@ -262,8 +268,8 @@ ## v0.3.0 - 2014-06-03  * Support for InfluxDB v0.7-    * Renamed `username` field for `/cluster_admins` to `user`-    * No support for the old field name+  * Renamed `username` field for `/cluster_admins` to `user`+  * No support for the old field name  ## v0.2.2 - 2014-05-08 
influxdb.cabal view
@@ -1,5 +1,5 @@ name: influxdb-version: 1.6.1.3+version: 1.7.0 synopsis: Haskell client library for InfluxDB description:   @influxdb@ is a Haskell client library for InfluxDB.@@ -15,11 +15,11 @@ build-type: Custom cabal-version: 1.24 tested-with:-  GHC == 7.10.3   GHC == 8.0.2   GHC == 8.2.2   GHC == 8.4.4-  GHC == 8.6.4+  GHC == 8.6.5+  GHC == 8.8.1  extra-source-files:   README.md@@ -73,17 +73,17 @@     ViewPatterns   ghc-options: -Wall   build-depends:-      base >= 4.8 && < 4.13+      base >= 4.9 && < 4.14     , aeson >= 0.7 && < 1.5     , attoparsec < 0.14     , bytestring >= 0.10 && < 0.11-    , clock >= 0.7 && < 0.8+    , clock >= 0.7 && < 0.9     , containers >= 0.5 && < 0.7     , foldl < 1.5     , http-client >= 0.5 && < 0.7     , http-types >= 0.8.6 && < 0.13     , lens >= 4.9 && < 4.18-    , network >= 2.6 && < 3.1+    , network >= 2.6 && < 3.2     , optional-args >= 1.0 && < 1.1     , scientific >= 0.3.3 && < 0.4     , tagged >= 0.1 && < 0.9
src/Database/InfluxDB/JSON.hs view
@@ -34,6 +34,7 @@ import Control.Applicative import Control.Exception import Control.Monad+import qualified Control.Monad.Fail as Fail import Data.Maybe  import Data.Aeson@@ -122,26 +123,26 @@  -- | Get a field value from a column name getField-  :: Monad m+  :: Fail.MonadFail m   => Text -- ^ Column name   -> Vector Text -- ^ Columns   -> Vector Value -- ^ Field values   -> m Value getField column columns fields =   case V.elemIndex column columns of-    Nothing -> fail $ "getField: no such column " ++ show column+    Nothing -> Fail.fail $ "getField: no such column " ++ show column     Just idx -> case V.indexM fields idx of-      Nothing -> fail $ "getField: index out of bound for " ++ show column+      Nothing -> Fail.fail $ "getField: index out of bound for " ++ show column       Just field -> return field  -- | Get a tag value from a tag name getTag-  :: Monad m+  :: Fail.MonadFail m   => Text -- ^ Tag name   -> HashMap Text Value -- ^ Tags   -> m Value getTag tag tags = case HashMap.lookup tag tags of-  Nothing -> fail $ "getTag: no such tag " ++ show tag+  Nothing -> Fail.fail $ "getTag: no such tag " ++ show tag   Just val -> return val  -- | Parse a result response.
src/Database/InfluxDB/Query.hs view
@@ -444,7 +444,7 @@     applyBasicAuth =       case queryAuthentication of         Nothing -> id-        Just (Credentials {..}) ->+        Just Credentials {..} ->           HC.applyBasicAuth (TE.encodeUtf8 _user) (TE.encodeUtf8 _password)  errorQuery :: String -> HC.Request -> HC.Response body -> A.Value -> IO a
src/Database/InfluxDB/Types.hs view
@@ -7,7 +7,6 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-}-{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-}