Although Datahike supports a part of Datomic's
behavior is different using the different functions. Datahike supports part of the
Without differences in the signature you may use the following like in Datomic:
Please be aware that
q returns sets instead of vectors. Only when using aggregates or
q returns a
vector. That is the behavior of Datascript.
The following functions from the
datahike.api namespace are different from Datomic's client API:
Additionally, datahike supports most functions from datascript
These functions of Datomic are not yet implemented but considered candidates for future development:
These functions are part of Datomics' distributed implementation and are currently not part of the
Async support is on our roadmap as well as running distributed Datahike.
Connects to an existing database given the configuration hash-map where Datomic
takes a client as argument. The specification for the configuration can be found
Creates a new database with the given configuration hash-map where Datomic takes a client and an
arg-map as arguments. Additional optional parameters are
initial-tx. Have a look at the configuration documentation for details.
Deletes a database with the configuration hash-map as argument.
Checks if a database exists with the configuration hash-map as argument.
Since the database can be just de-referenced from the connection this function is
just a small wrapper for Datomic compliance.
Returns a hash map different from Datomics' as a report. The
:tx-meta is not part
of Datomics' transaction report but apart from that the same keys are present. The
values are different records though.
Applies transactions to an immutable database value and returns a new database
snapshot. It does not change the mutable database inside the connection unlike
transact. It works quite the same as Datomics'
with but does
not need a
with-db function to work.