Simple Haskell client, WIP and an experiment.
First run:
cabal build
cabal exec ghci src/TerminusDBClient.hs
:set -XOverloadedStrings
And try some examples:
let client = initClient "localhost" "root" "admin" "test"
executeQuery client queryAllDatabases
queryAllDatabases = Query (Using "_system"
(Triple
(WOQLVar "X")
(WOQLNode "rdf:type")
(WOQLNode "system:Database")
)
)
Querying this can be done by using executeQuery
.
executeQuery client queryAllDatabases
printJSON queryAllDatabases -- prints the WOQL JSONLD
- Only supports HTTP
- Port is hardcoded to 6363