Safe Haskell | None |
---|---|
Language | Haskell2010 |
There is a primitive API derived after the creation of hquery
defined by the following data structures and actions:
Synopsis
- hquery :: Environment -> IO ()
- getSciDbVersion :: Environment -> IO String
- mkGlobalManagerEnv :: Environment -> IO (Maybe Environment)
- runQueries :: Environment -> String -> IO [Err String]
- unsafeRunQuery :: Environment -> String -> IO String
Documentation
hquery :: Environment -> IO () Source #
Given an Environment
, either run the given file of queries and
the operands on the command line as queries or run queries interactively.
getSciDbVersion :: Environment -> IO String Source #
Get the version of SciDB, e.g., 18.1.0, via shim given an Environment
.
mkGlobalManagerEnv :: Environment -> IO (Maybe Environment) Source #
Given an Environment
, make and set the global network manager,
check for digest authorization and the SciDB version, and update
the Environment
. Either return 'Just Environment' or Nothing
in the IO monad in the case of an invalid certificate store when
the protocol is HTTPS and insecure validation is not used. Be
careful: no resolving or verification of the Environment
is
performed. When mkGlobalManagerEnv
returns 'Just Environment',
this is the initialized Environment
to be used with the actions
runQueries
and unsafeRunQuery
.
runQueries :: Environment -> String -> IO [Err String] Source #
Given an Environment
, run a string of semi-colon (;)
separated SciDB AFL queries and fetch defNumber
lines (23 by
default) from the result of each query if the query returns a
result. Like hquery
, runQueries
determines if the SciDB
operator returns lines or not via interpretOperatorId
in
Interpreter.hs.
unsafeRunQuery :: Environment -> String -> IO String Source #
Given an Environment
, run a string that is one SciDB AFL
query without terminating semicolon (;). The string is sent to the
shim server without modification or verification. Fetch
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
Interpreter.hs for details.