Clojure client API for Triplox.
Clojure client API for Triplox.
(connect host port)Connect to a Triplox server. Returns a TriploxNode (AutoCloseable).
Connect to a Triplox server. Returns a TriploxNode (AutoCloseable).
(db conn)(db conn {:keys [tx-id system-time] :as tx-key})Open a DB value. Returns a Db.
Open a DB value. Returns a Db.
(q db query & args)Execute a Datalog query. Returns a vector of vectors.
Execute a Datalog query. Returns a vector of vectors.
(submit-tx conn tx-data)Submits a transaction without waiting for indexing. Returns a tx-key as map.
Submits a transaction without waiting for indexing. Returns a tx-key as map.
(subscribe conn query & args)Register an incremental query and stream its result deltas. A non-empty
initial result is the first delta. Returns a Subscription (Closeable); use
with with-open. Closing unsubscribes.
Register an incremental query and stream its result deltas. A non-empty initial result is the first delta. Returns a Subscription (Closeable); use with `with-open`. Closing unsubscribes.
(take! sub)(take! sub timeout-ms)Block for the next delta. Returns a vector of [row-values weight] pairs
or nil when the stream is closed. The 2-arity bounds the wait,
returning ::timeout on expiry.
Block for the next delta. Returns a vector of `[row-values weight]` pairs or nil when the stream is closed. The 2-arity bounds the wait, returning `::timeout` on expiry.
(transact conn tx-data)Execute a transaction and wait for indexing. Returns a result map of
:tx-id - the transaction id :system-time - the time the transaction was registered on the log :committed? - whether the transaction was committed or not :error-message - optional error message if the transaction was not committed
Execute a transaction and wait for indexing. Returns a result map of :tx-id - the transaction id :system-time - the time the transaction was registered on the log :committed? - whether the transaction was committed or not :error-message - optional error message if the transaction was not committed
(tx-key sub)The registration tx-key of a subscription, as a map.
The registration tx-key of a subscription, as a map.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |