Liking cljdoc? Tell your friends :D

kala.client

Remote client library: the same core operation surface as the embedded peer — db, transact, q, pull, datoms, and the time-travel reads — served through a running transactor over the wire protocol (docs/wire-protocol.md).

A client connection holds one socket; operations are serialized on it. (api/db conn) returns a RemoteDb marker pinned to the transactor's current t; as-of/since/history derive further markers; transact reports carry :db-before/:db-after markers at the surrounding ts. Entity navigation is a peer-only feature and is rejected explicitly in client mode.

Remote client library: the same core operation surface as the embedded
peer — db, transact, q, pull, datoms, and the time-travel reads — served
through a running transactor over the wire protocol (docs/wire-protocol.md).

A client connection holds one socket; operations are serialized on it.
(api/db conn) returns a RemoteDb marker pinned to the transactor's current
t; as-of/since/history derive further markers; transact reports carry
:db-before/:db-after markers at the surrounding ts. Entity navigation is
a peer-only feature and is rejected explicitly in client mode.
raw docstring

as-ofclj

(as-of db t)

A marker for the server-side db value as of t (a t counter or tx entity id).

A marker for the server-side db value as of t (a t counter or tx entity id).
raw docstring

closeclj

(close c)

Close the client's socket.

Close the client's socket.
raw docstring

connectclj

(connect {:keys [host port name] :or {host "127.0.0.1" port 4334 name "db"}})

Connect to a running transactor: {:host "127.0.0.1" :port 4334 :name "db"}. Performs the protocol handshake; a version mismatch throws.

Connect to a running transactor: {:host "127.0.0.1" :port 4334 :name "db"}.
Performs the protocol handshake; a version mismatch throws.
raw docstring

datomsclj

(datoms db index components)

Enumerate datoms server-side. Datoms arrive as plain maps with :e :a :v :tx :added (attribute idents as :a).

Enumerate datoms server-side. Datoms arrive as plain maps with
:e :a :v :tx :added (attribute idents as :a).
raw docstring

dbclj

(db c)

A marker for the transactor's current db value.

A marker for the transactor's current db value.
raw docstring

entidclj

(entid db ident)

Resolve an ident to its entity id via a server-side lookup; entity ids pass through.

Resolve an ident to its entity id via a server-side lookup; entity ids
pass through.
raw docstring

historyclj

(history db)

A marker for the server-side history value (every assertion and retraction, each with its added flag).

A marker for the server-side history value (every assertion and
retraction, each with its added flag).
raw docstring

listenclj

(listen c callback)

Open a notification socket to the same transactor and invoke (callback msg) for every pushed transaction completion ({:notification :tx-completed :t t}). Returns {:stop! f}. Callbacks run on the reader thread — return fast.

Open a notification socket to the same transactor and invoke (callback
msg) for every pushed transaction completion ({:notification
:tx-completed :t t}). Returns {:stop! f}. Callbacks run on the reader
thread — return fast.
raw docstring

pullclj

(pull db pattern eid)

Pull a document server-side.

Pull a document server-side.
raw docstring

qclj

(q query db & inputs)

Run a Datalog query server-side against the remote db; extra :in inputs (beyond $) travel in :args.

Run a Datalog query server-side against the remote db; extra :in inputs
(beyond $) travel in :args.
raw docstring

sinceclj

(since db t)

A marker for a server-side since view: only facts asserted after t.

A marker for a server-side since view: only facts asserted after t.
raw docstring

transactclj

(transact c tx-data)

Submit tx-data through the transactor. The report carries :t, :tx-data, :tempids, and :db-before/:db-after RemoteDb markers (the db values themselves live server-side).

Submit tx-data through the transactor. The report carries :t, :tx-data,
:tempids, and :db-before/:db-after RemoteDb markers (the db values
themselves live server-side).
raw docstring

withclj

(with db tx-data)

Speculative transaction executed server-side against the remote db (or its as-of view). No storage effect. :db-after addresses the speculative value held by the transactor (:db-ref); it is readable with q/pull/datoms until the transactor drops it.

Speculative transaction executed server-side against the remote db (or
its as-of view). No storage effect. :db-after addresses the speculative
value held by the transactor (:db-ref); it is readable with q/pull/datoms
until the transactor drops it.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close