datomic.client.api.async

Async client API for Datomic. See also datomic.client.api
for the corresponding synchronous API.

Functions in this namespace that communicate with a separate process
take an arg-map with the following optional keys:

  :timeout      timeout in msec

Asynchronous functions return a core.async channel. In the case of an
error, the channel will get an error map with contents specified by
cognitect.anomalies. See https://github.com/cognitect-labs/anomalies.

Functions that return chunked results will return a succession of
vectors of values in a channel. The channel will be closed when the
results are exhausted.  If there is an error it will be in the channel
instead of the chunk. Chunked functions support the following optional
keys:

  :chunk     Optional. Maximum number of results that will be returned
             for each chunk, up to 10000. Defaults to 1000.
  :offset    Number of results to omit from the beginning
             of the returned data.
  :limit     Maximum total number of results to return.
             Specify -1 for no limit. Defaults to 1000.

Functions that return datoms return values of a type that supports
indexed (count/nth) access of [e a v t added] as well as
lookup (keyword) access via :e :a :v :t :added.

as-of

(as-of db t)
Identical to datomic.api.client/as-of.

client

(client arg-map)
Identical to datomic.client.api/client.

connect

(connect client db-name)
Async version of datomic.client.api/connect.
Returns a channel. See namespace doc for timeout/error handling.

create-database

(create-database client arg-map)
Async version of datomic.api.client/create-database.
Returns a channel. See namespace doc for timeout/error handling.

datoms

(datoms db arg-map)
Async and chunked version of datomic.api.client/datoms.
Returns a channel. See namespace doc for chunking, timeout, and
error handling.

db

(db conn)
Identical to datomic.api.client/db.

db-stats

(db-stats db)
Async version of datomic.api.client/db-stats.
Returns a channel.  See namespace doc for timeout/error handling..

delete-database

(delete-database client arg-map)
Async version of datomic.api.client/delete-database.
Returns a channel. See namespace doc for timeout/error handling.

history

(history db)
Identical to datomic.api.client/history.

index-range

(index-range db arg-map)
Async and chunked version of datomic.api.client/index-range.
Returns a channel. See namespace doc for chunking, timeout, and
error handling.

list-databases

(list-databases client arg-map)
Async version of datomic.api.async/list-databases.
Returns a channel. See namespace doc for timeout/error handling.

pull

(pull db arg-map)
Async version of datomic.api.client/pull.
Returns a channel. See namespace doc for timeout/error handling.

q

(q arg-map)
Async and chunked version of datomic.api.client/q.
Returns a channel. See namespace doc for chunking, timeout, and
error handling.

since

(since db t)
Identical to datomic.api.client/since.

sync

(sync conn t)
Async version of datomic.api.client/sync.
Returns a channel

transact

(transact conn arg-map)
Async version of datomic.api.client/transact.
Returns a channel.  See namespace doc for timeout/error handling.

tx-range

(tx-range conn arg-map)
Async and chunked version of datomic.api.client/tx-range.
Returns a channel. See namespace doc for chunking, timeout, and
error handling.

with

(with db m)
Async version of datomic.api.client/with.
Returns a channel.  See namespace doc for timeout/error handling.

with-db

(with-db conn)
Identical to datomic.api.client/with-db.