Protocol methods for accessing Datomic-flavored databases.
Add the following dependency to your deps.edn file:
org.duct-framework/database.datalog {:mvn/version "0.2.0"}
Or to your Leiningen project file:
[org.duct-framework/database.datalog "0.2.0"]
A Datomic-flavored database connection should satisfy the Connection
protocol:
(extend-type SomeConnection
duct.database.datalog/Connection
(-db [conn] ...) ;; return the database
(-transact! [conn tx-data] ...)) ;; write transaction
The database instance, returned by -db, should satisfy the Database
protocol:
(extend-type SomeDatabase
duct.database.datalog/Database
(-q [conn query inputs])) ;; query the database
This simplified interface does not capture all the nuances and functionality of the databases it wraps, but it does allow for simple queries and transactions to be made.
Copyright © 2026 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
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 |