packages feed

scidb-hquery 2.8.0.436 → 2.8.0.437

raw patch · 9 files changed

+149/−50 lines, 9 filesdep −base-compatdep ~haskelinedep ~memorydep ~regexPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: base-compat

Dependency ranges changed: haskeline, memory, regex

API changes (from Hackage documentation)

+ Environment: [waitOnStdIn] :: Environment -> Bool
- Environment: Env :: String -> String -> String -> String -> String -> String -> Bool -> Bool -> Bool -> RequestHeaders -> Maybe Bool -> String -> String -> Maybe Bool -> String -> String -> Maybe String -> String -> String -> String -> String -> [String] -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Verbosity -> String -> Bool -> Environment
+ Environment: Env :: String -> String -> String -> String -> String -> String -> Bool -> Bool -> Bool -> RequestHeaders -> Maybe Bool -> String -> String -> Maybe Bool -> String -> String -> Maybe String -> String -> String -> String -> String -> [String] -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Verbosity -> String -> Bool -> Environment

Files

CHANGELOG.md view
@@ -1,29 +1,33 @@ # Revision history for scidb-hquery -## 2.8.0.429 -- 2019-07-06+## 2.8.0.437 -- 2020-03-23 -* First packaged version of SciDB hquery released to git and cabal.+* Added the --wait-on-stdin (-W) option to resolve issue #1.  Removed the now unnecessary base-compat constraint given regex-1.0.*-r1.  Removed extra 'import Crypto.Hash' line in UtilsUnsafe.hs.  Corrected some small documentation issues.  Updated the scidb-hquery.cabal and stack.yaml files and added a stack.yaml file.  These changes did not change the primitive API of hquery.  Tested lightly with SciDB 19.11 community edition. -## 2.8.0.431 -- 2019-07-06+## 2.8.0.436 -- 2019-11-13 -* Ready to be uploaded to hackage.+* Added a base-compat constraint so that regex always compiles and added tested-with to the cabal file. Changed the stack resolver to lts-14.14.  Small improvement in the documentation. -## 2.8.0.432 -- 2019-07-08+## 2.8.0.435 -- 2019-07-27 -* Corrected problems discovered with cabal candidate package 2.8.0.431.+* Now works with stack. +## 2.8.0.434 -- 2019-07-12++* Improved README.md and description documentation.+ ## 2.8.0.433 -- 2019-07-11  * Added README.md to extra-source-files. -## 2.8.0.434 -- 2019-07-12+## 2.8.0.432 -- 2019-07-08 -* Improved README.md and description documentation.+* Corrected problems discovered with cabal candidate package 2.8.0.431. -## 2.8.0.435 -- 2019-07-27+## 2.8.0.431 -- 2019-07-06 -* Now works with stack.+* Ready to be uploaded to hackage. -## 2.8.0.436 -- 2019-11-13+## 2.8.0.429 -- 2019-07-06 -* Added a base-compat constraint so that regex always compiles and added tested-with to the cabal file. Changed the stack resolver to lts-14.14.  Small improvement in the documentation.+* First packaged version of SciDB hquery released to git and cabal.
README.md view
@@ -34,7 +34,7 @@    hquery - Haskell query for SciDB via shim  SYNOPSIS-   hquery [-V n] [-t hstfile] [-c certstore] [-n]+   hquery [-V n] [-W] [-t hstfile] [-c certstore] [-n]              [-r http[s]] [-i host] [-p port] [-a true|false]                [-e true|false] [-o fmt] [-b num] [-d|-s]                  [-u usr] [-w pw]@@ -243,6 +243,10 @@   -V1 Shows some HTTP exceptions and trace information (--verbose=1).   -V2 Shows additional URL information (--verbose=2). +   -W Wait on stdin (--wait-on-stdin).  In some cases, hquery can+      determine that stdin is ready in which case it is consumed.+      The -W option guarantees that hquery waits on stdin.+ OPERANDS    SciDB AFL queries. @@ -250,11 +254,11 @@    The development of the utility hquery began with SciDB community    edition 13 and continued with 14, 15, 16, 18, and 19. -   This version of hquery has been lightly tested with ghc-   version 8.2.2 and 8.6.5 and SciDB 18.1 and 19.3 community edition.+   This version of hquery has been lightly tested with ghc version+   8.2.2 and 8.6.5 and SciDB 18.1, 19.3 and 19.11 community edition.    Currently the command hquery has never been tested on a SciDB-   enterprise edition, and thus it is not known if SciDB-   authorization (-s) or prefix (-x) actually works.+   enterprise edition, and thus it is not known if SciDB authorization+   (-s) or a prefix (-x) actually works.  EXAMPLES    To list all currently defined arrays with SciDB authorization@@ -296,6 +300,11 @@       hquery -i coordinator -b 0 -x "set_namespace('sensor_data');" \          "list('arrays');"++   To find and project the arrays A, B, C and D to be removed, use+     +     hquery -otsv "project(apply(filter(list('arrays'),regex(name,'A|B|C|D')),+         remove,'remove('+name+');'),remove);" | hquery -W     To display a synopsis of this internal manual page, use 
scidb-hquery.cabal view
@@ -1,11 +1,12 @@ cabal-version: 2.4 name: scidb-hquery-version: 2.8.0.436+version: 2.8.0.437 license: GPL-3.0-only license-file: LICENSE copyright: All rights reserved 2014-19(c). maintainer: marcus@gabriel.name author: Marcus D. Gabriel+tested-with: ghc ==8.6.5 homepage: https://github.com/mdgabriel/scidb-hquery.git bug-reports: https://github.com/mdgabriel/scidb-hquery/issues synopsis: Haskell query for SciDB via shim@@ -14,19 +15,19 @@     interacitve session with a SciDB server using SciDB's shim     protocol at host localhost and port 8080.  See the [homepage](https://github.com/mdgabriel/scidb-hquery.git),     "hquery -m", and [www.paradigm4.com](http://www.paradigm4.com) for more infomation.-    Note that scidb-hquery builds with cabal v2-build and stack resolver lts-14.14.+    Note that scidb-hquery builds with cabal v2-build and stack resolver lts-14.27. category: program, client, database, library build-type: Custom extra-source-files:     CHANGELOG.md     README.md     src/SciDbAFL.cf-tested-with: GHC==8.6.5+    stack.yaml  source-repository head     type: git     location: https://github.com/mdgabriel/scidb-hquery.git-    tag: 2.8.0.436+    tag: 2.8.0.437  custom-setup     setup-depends: base >=4.12.0.0 && <4.13,@@ -69,19 +70,17 @@         cryptonite >=0.25 && <0.27,         data-default-class >=0.1.2.0 && <0.2,         exceptions >=0.10.2 && <0.11,-        haskeline >=0.7.5.0 && <0.8,+        haskeline >=0.7.5.0 && <0.9,         hostname-validate >=1.0.0 && <1.1,         http-client >=0.5.14 && <0.7,         http-client-tls >=0.3.5.3 && <0.4,         http-conduit >=2.3.7.1 && <2.4,         http-types >=0.12.3 && <0.13,-        memory >=0.14.18 && <0.15,+        memory >=0.14.18 && <0.16,         mtl >=2.2.2 && <2.3,         network >=2.8.0.1 && <3.2,         process >=1.6.5.0 && <1.7,-        -- base-compat constraint needed so that regex continues to compile-        base-compat >=0.6 && <0.11,-        regex >=1.0.2.0 && <1.1,+        regex >=1.0.2.0 && <1.2,         safe >=0.3.17 && <0.4,         split >=0.2.3.3 && <0.3,         terminal-size >=0.3.2.1 && <0.4,@@ -125,19 +124,17 @@         directory >=1.3.3.0 && <1.4,         exceptions >=0.10.2 && <0.11,         filepath >=1.4.2.1 && <1.5,-        haskeline >=0.7.5.0 && <0.8,+        haskeline >=0.7.5.0 && <0.9,         hostname-validate >=1.0.0 && <1.1,         http-client >=0.5.14 && <0.7,         http-client-tls >=0.3.5.3 && <0.4,         http-conduit >=2.3.7.1 && <2.4,         http-types >=0.12.3 && <0.13,-        memory >=0.14.18 && <0.15,+        memory >=0.14.18 && <0.16,         mtl >=2.2.2 && <2.3,         network >=2.8.0.1 && <3.2,         process >=1.6.5.0 && <1.7,-        -- base-compat constraint needed so that regex continues to compile-        base-compat >=0.6 && <0.11,-        regex >=1.0.2.0 && <1.1,+        regex >=1.0.2.0 && <1.2,         safe >=0.3.17 && <0.4,         split >=0.2.3.3 && <0.3,         terminal-size >=0.3.2.1 && <0.4,
src/Environment.hs view
@@ -46,6 +46,7 @@         , password    :: String       -- ^ Password for username         , operands    :: [String]     -- ^ List of queries         , file        :: String       -- ^ File of queries+        , waitOnStdIn :: Bool         -- ^ Wait on stdin         , help        :: Bool         -- ^ @-h@, display help summary         , license     :: Bool         -- ^ @-l@, display license terms         , manual      :: Bool         -- ^ @-m@, display internal man page@@ -86,6 +87,7 @@         , password    = ""                      -- Password needed for -d or -s option         , operands    = []                      -- No operands by default, i.e., interactive mode         , file        = ""                      -- No file of queries by default+        , waitOnStdIn = False                   -- Wait on stdin         , help        = False                   -- False or off by default         , license     = False                   -- False or off by default         , manual      = False                   -- False or off by default
src/HQuery.hs view
@@ -74,7 +74,7 @@                                                           ,defReadingLines,defPrefix,digestAuth                                                           ,digestHeaders,file,history,host,insecure                                                           ,operands,password,port,protocol,sciDbVersion-                                                          ,scidbAuth,username,verbose)+                                                          ,scidbAuth,username,verbose,waitOnStdIn)                                                ,defaultEnv,maybePort,Verbosity(..)) import ErrM                                   (Err(..)) import Interpreter                            (Results(..),interpret)@@ -201,7 +201,7 @@ -- 'defNumber' lines (23 by default); an exception occurs when -- attempting to fetch no returned lines.  If fetch is false, do not -- fetch any lines. For exmample, fetch should be set to false for--- store, create and load.  See 'interpretOperatorId' in+-- store, create and load.  See 'interpretFuncId' in -- Interpreter.hs for details.  unsafeRunQuery :: Environment -> String -> IO String@@ -240,11 +240,11 @@               do initParam                  e <- ask                  r <- liftIO $ hReady stdin-                 if null (operands e) && null (file e) && not r+                 if null (operands e) && null (file e) && not (waitOnStdIn e) && not r                  then do liftIO $ putStrLn ("SciDB version "++sciDbVersion e)                          executeQuery DontExitOnBad "list('instances');"                          iQuery-                 else do c <- liftIO $ if r then getContents else return ""+                 else do c <- liftIO $ if r || waitOnStdIn e then getContents else return ""                          f <- liftIO $ (if null (file e) then return else readFile) (file e)                          let a = intercalate "\n" ("":(nolines <$> operands e))                          executeQuery ExitOnBad (c ++ f ++ a)
src/Main.hs view
@@ -68,7 +68,7 @@ >    hquery - Haskell query for SciDB via shim >  > SYNOPSIS->    hquery [-V n] [-t hstfile] [-c certstore] [-n]+>    hquery [-V n] [-W] [-t hstfile] [-c certstore] [-n] >              [-r http[s]] [-i host] [-p port] [-a true|false] >                [-e true|false] [-o fmt] [-b num] [-d|-s] [-u usr] [-w pw] >                  [-f qyfile] [query...]@@ -276,6 +276,10 @@ >   -V1 Shows some HTTP exceptions and trace information (--verbose=1). >   -V2 Shows additional URL information (--verbose=2). > +>    -W Wait on stdin (--wait-on-stdin).  In some cases, hquery can+>       determine that stdin is ready in which case it is consumed.+>       The -W option guarantees that hquery waits on stdin.+>  > OPERANDS >    SciDB AFL queries. > @@ -283,11 +287,11 @@ >    The development of the utility hquery began with SciDB community >    edition 13 and continued with 14, 15, 16, 18, and 19. > ->    This version of hquery has been lightly tested with ghc->    version 8.2.2 and 8.6.5 and SciDB 18.1 and 19.3 community edition.+>    This version of hquery has been lightly tested with ghc version+>    8.2.2 and 8.6.5 and SciDB 18.1, 19.3 and 19.11 community edition. >    Currently the command hquery has never been tested on a SciDB->    enterprise >    edition, and thus it is not known if SciDB->    authorization (-s) or prefix (-x) actually works.+>    enterprise edition, and thus it is not known if SciDB authorization+>    (-s) or a prefix (-x) actually works. >  > EXAMPLES >    To list all currently defined arrays with SciDB authorization required,@@ -330,6 +334,11 @@ >      hquery -i coordinator -b 0 -x "set_namespace('sensor_data');" \ >          "list('arrays');" > +>    To find and project the arrays A, B, C and D to be removed, use+> +>      hquery -otsv "project(apply(filter(list('arrays'),regex(name,'A|B|C|D')),+>          remove,'remove('+name+');'),remove);" | hquery -W+>  >    To display a synopsis of this internal manual page, use >  >      hquery -y@@ -455,9 +464,9 @@     Config {             argOrder       = RequireOrder,             -- Update revision number: toggle case-            release        = "2.8.0.436",+            release        = "2.8.0.437",             flagsOps       = " [[-g|-h|-l|-m|-v|-y] |"++-                             "\n                 [-V n] [-t hstfile] [-c certstore] [-n]"+++                             "\n                 [-V n] [-W] [-t hstfile] [-c certstore] [-n]"++                              "\n                   [-r http[s]] [-i host] [-p port] [-a true|false]"++                              "\n                     [-e true|false] [-o fmt] [-b num] [-d|-s] [-u usr] [-w pw]"++                              "\n                       [-f qyfile] [query...]"++@@ -475,7 +484,7 @@ -} data Flag = Help | License | Manual | Synopsis | Version | Verbose Verbosity           | Host String | Port String | Protocol String | File FilePath-          | History String | Username String | Password String+          | History String | Username String | Password String | WaitOnStdIn           | Fetch String | Format String | Number String | VersionSciDb           | DigestAuth | SciDbAuth | CertStore String | Insecure           | ReadingLines String | Prefix String@@ -508,6 +517,7 @@     , Option "y" ["synopsis"] (NoArg Synopsis)             "Help synopsis."     , Option "x" ["prefix"]   (ReqArg Prefix "PREFIX")     "Prefix to execute before a query by shim."     , Option "V" ["verbose"]  (OptArg inpver "012")        "Verbose information to stderr."+    , Option "W" ["wait-on-stdin"] (NoArg WaitOnStdIn)     "Wait on stdin."     ]     where inpver :: Maybe String -> Flag           inpver ms = Verbose $ case (fromMaybe (-1) . readMay . fromMaybe "1") ms of@@ -546,6 +556,7 @@       Version    -> env{version   =   True}       VersionSciDb->env{versionSciDb= True}       Verbose v  -> env{verbose   =      v}+      WaitOnStdIn-> env{waitOnStdIn = True}     where tOrF s = case fmap toLower s of                      "true"  -> Just True                      "false" -> Just False
src/Manual.hs view
@@ -19,7 +19,7 @@     "   hquery - Haskell query for SciDB via shim\n"++     "\n"++     "SYNOPSIS\n"++-    "   hquery [-V n] [-t hstfile] [-c certstore] [-n]\n"+++    "   hquery [-V n] [-W] [-t hstfile] [-c certstore] [-n]\n"++     "             [-r http[s]] [-i host] [-p port] [-a true|false]\n"++     "               [-e true|false] [-o fmt] [-b num] [-d|-s] [-u usr] [-w pw]\n"++     "                 [-f qyfile] [query...]\n"++@@ -227,6 +227,10 @@     "  -V1 Shows some HTTP exceptions and trace information (--verbose=1).\n"++     "  -V2 Shows additional URL information (--verbose=2).\n"++     "\n"+++    "   -W Wait on stdin (--wait-on-stdin).    In some cases, hquery can\n"+++    "      determine that stdin is ready in which case it is consumed.\n"+++    "      The -W option guarantees that hquery waits on stdin.\n"+++    "\n"++     "OPERANDS\n"++     "   SciDB AFL queries.\n"++     "\n"++@@ -234,11 +238,11 @@     "   The development of the utility hquery began with SciDB community\n"++     "   edition 13 and continued with 14, 15, 16, 18, and 19.\n"++     "\n"++-    "   This version of hquery has been lightly tested with ghc\n"++-    "   version 8.2.2 and 8.6.5 and SciDB 18.1 and 19.3 community edition.\n"++-    "   Currently the command hquery has never been tested on a SciDB\n"++-    "   enterprise edition, and thus it is not known if SciDB\n"++-    "   authorization (-s) or prefix (-x) actually works.\n"+++    "    This version of hquery has been lightly tested with ghc version\n"+++    "    8.2.2 and 8.6.5 and SciDB 18.1, 19.3 and 19.11 community edition.\n"+++    "    Currently the command hquery has never been tested on a SciDB\n"+++    "    enterprise edition, and thus it is not known if SciDB authorization\n"+++    "    (-s) or a prefix (-x) actually works.\n"++     "\n"++     "EXAMPLES\n"++     "   To list all currently defined arrays with SciDB authorization required,\n"++@@ -280,6 +284,11 @@     "\n"++     "     hquery -i coordinator -b 0 -x \"set_namespace('sensor_data');\" \\\n"++     "         \"list('arrays');\"\n"+++    "\n"+++    "   To find and project the arrays A, B, C and D to be removed, use\n"+++    "\n"+++    "     hquery -otsv \"project(apply(filter(list('arrays'),regex(name,'A|B|C|D')),\n"+++    "         remove,'remove('+name+');'),remove);\" | hquery -W\n"++     "\n"++     "   To display a synopsis of this internal manual page, use\n"++     "\n"++
src/UtilsUnsafe.hs view
@@ -15,7 +15,6 @@ import qualified Data.ByteString.Char8 as C (pack)  import Control.Monad            (unless)-import Crypto.Hash              --() import Data.Char                (toLower) import Data.Default.Class       (def) import Data.Maybe               (fromMaybe,fromJust,isNothing)
+ stack.yaml view
@@ -0,0 +1,68 @@+# This file was automatically generated by 'stack init'+#+# Some commonly used options have been documented as comments in this file.+# For advanced use and comprehensive documentation of the format, please see:+# https://docs.haskellstack.org/en/stable/yaml_configuration/++# Resolver to choose a 'specific' stackage snapshot or a compiler version.+# A snapshot resolver dictates the compiler version and the set of packages+# to be used for project dependencies. For example:+#+# resolver: lts-3.5+# resolver: nightly-2015-09-21+# resolver: ghc-7.10.2+#+# The location of a snapshot can be provided as a file or url. Stack assumes+# a snapshot provided as a file might change, whereas a url resource does not.+#+# resolver: ./custom-snapshot.yaml+# resolver: https://example.com/snapshots/2018-01-01.yaml+resolver: lts-14.27++# User packages to be built.+# Various formats can be used as shown in the example below.+#+# packages:+# - some-directory+# - https://example.com/foo/bar/baz-0.0.2.tar.gz+#   subdirs:+#   - auto-update+#   - wai+packages:+- .+# Dependency packages to be pulled from upstream that are not in the resolver.+# These entries can reference officially published versions as well as+# forks / in-progress versions pinned to a git hash. For example:+#+# extra-deps:+# - acme-missiles-0.3+# - git: https://github.com/commercialhaskell/stack.git+#   commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a+#+# extra-deps: []+extra-deps:+- BNFC-2.8.3@sha256:606b82fb80afd92ac5059ec76ea96992b23ae30196c511f1bb8e92addbf2edfe,10943++# Override default flag values for local packages and extra-deps+# flags: {}++# Extra package databases containing global packages+# extra-package-dbs: []++# Control whether we use the GHC we find on the path+# system-ghc: true+#+# Require a specific version of stack, using version ranges+# require-stack-version: -any # Default+# require-stack-version: ">=2.1"+#+# Override the architecture used by stack, especially useful on Windows+# arch: i386+# arch: x86_64+#+# Extra directories used by stack for building+# extra-include-dirs: [/path/to/dir]+# extra-lib-dirs: [/path/to/dir]+#+# Allow a newer minor version of GHC than the snapshot specifies+# compiler-check: newer-minor