summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitsutoshiAoe <>2018-07-23 00:10:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-07-23 00:10:00 (GMT)
commit09b510695221c1030408c5aa8f8f400e4430dd55 (patch)
tree70187c2c8082f5f9c5fbcee4abd53d1021bbba88
parente0c30ce7565f920fcafd6b0481a6cfa88de51f7e (diff)
version 1.6.0.71.6.0.7
-rw-r--r--CHANGELOG.md4
-rw-r--r--influxdb.cabal26
-rw-r--r--src/Database/InfluxDB.hs2
-rw-r--r--src/Database/InfluxDB/Format.hs6
-rw-r--r--tests/test-suite.hs23
5 files changed, 13 insertions, 48 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a1f8fbe..280a357 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Revision history for influxdb
+## v1.6.0.7 - 2018-07-23
+
+* Relax upper version bound for base to support GHC 8.6 (#69)
+
## v1.6.0.6 - 2018-07-07
* Relax upper version bound for lens
diff --git a/influxdb.cabal b/influxdb.cabal
index c739c5e..b8c002e 100644
--- a/influxdb.cabal
+++ b/influxdb.cabal
@@ -1,10 +1,10 @@
name: influxdb
-version: 1.6.0.6
+version: 1.6.0.7
synopsis: Haskell client library for InfluxDB
description:
@influxdb@ is a Haskell client library for InfluxDB.
.
- Read "Database.InfluxDB" for a quick start guide.
+ See "Database.InfluxDB" for a quick start guide.
homepage: https://github.com/maoe/influxdb-haskell
license: BSD3
license-file: LICENSE
@@ -18,7 +18,7 @@ tested-with:
GHC == 7.10.3
GHC == 8.0.2
GHC == 8.2.2
- GHC == 8.4.1
+ GHC == 8.4.3
extra-source-files:
README.md
@@ -72,7 +72,7 @@ library
ViewPatterns
ghc-options: -Wall
build-depends:
- base >= 4.8 && < 4.12
+ base >= 4.8 && < 4.13
, aeson >= 0.7 && < 1.5
, attoparsec < 0.14
, bytestring >= 0.10 && < 0.11
@@ -93,24 +93,6 @@ library
hs-source-dirs: src
default-language: Haskell2010
-test-suite test-suite
- type: exitcode-stdio-1.0
- main-is: test-suite.hs
- build-depends:
- base
- , http-client
- , HUnit
- , influxdb
- , mtl
- , tasty
- , tasty-hunit <= 0.11
- , tasty-quickcheck
- , tasty-th
- , text
- , vector
- hs-source-dirs: tests
- default-language: Haskell2010
-
test-suite doctests
type: exitcode-stdio-1.0
main-is: doctests.hs
diff --git a/src/Database/InfluxDB.hs b/src/Database/InfluxDB.hs
index 68e5143..bbdb6bf 100644
--- a/src/Database/InfluxDB.hs
+++ b/src/Database/InfluxDB.hs
@@ -191,7 +191,7 @@ Or even using 'Data.Coerce.coerce':
=== Using a custom data type
We can define our custom data type and write a 'QueryResults' instance
-instead. 'getField', 'parseUTCTime' and 'parseQueryField' etc are avilable to
+instead. 'getField', 'parseUTCTime' and 'parseJSON' etc are avilable to
make it easier to write a JSON decoder.
>>> :{
diff --git a/src/Database/InfluxDB/Format.hs b/src/Database/InfluxDB/Format.hs
index 3472a6e..47b6f4d 100644
--- a/src/Database/InfluxDB/Format.hs
+++ b/src/Database/InfluxDB/Format.hs
@@ -157,7 +157,9 @@ stringBuilder = singleQuote . escapeSingleQuotes
database :: Format r (Database -> r)
database = makeFormat $ \(Database name) -> identifierBuilder name
--- | Format a key (e.g. field names, tag names, tag values etc).
+-- | Format an identifier (e.g. field names, tag names, etc).
+--
+-- Identifiers in InfluxDB protocol are surrounded with double quotes.
--
-- >>> formatQuery ("SELECT "%key%" FROM series") "field"
-- "SELECT \"field\" FROM series"
@@ -190,7 +192,7 @@ measurements = makeFormat $
mconcat . L.intersperse ","
. map (\(Measurement name) -> identifierBuilder name)
--- | Format 'QueryField'.
+-- | Format an InfluxDB value. Good for field and tag values.
--
-- >>> formatQuery ("SELECT * FROM series WHERE "%key%" = "%field) "location" "tokyo"
-- "SELECT * FROM series WHERE \"location\" = 'tokyo'"
diff --git a/tests/test-suite.hs b/tests/test-suite.hs
deleted file mode 100644
index 7f6e3c6..0000000
--- a/tests/test-suite.hs
+++ /dev/null
@@ -1,23 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE TemplateHaskell #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-import Control.Applicative
-import Control.Exception as E
-import Control.Monad.Trans
-import Data.Int
-import Data.List (find)
-import Data.Monoid
-import Data.Text (Text)
-import Data.Unique
-import Data.Word
-import qualified Data.Text as T
-import qualified Data.Text.Lazy as TL
-import qualified Data.Vector as V
-
-import Test.Tasty.HUnit
-import Test.Tasty.TH
-
-import Database.InfluxDB
-
-main :: IO ()
-main = $defaultMainGenerator