Integrant methods for connecting to a Datalevin database from the Duct framework. These methods can also be used outside Duct in any Integrant application.
Add the following dependency to your deps.edn file:
org.duct-framework/database.datalevin {:mvn/version "0.1.1"}
Or to your Leiningen project file:
[org.duct-framework/database.datalevin "0.1.1"]
This library provides the :duct.database/datalevin Integrant key,
which takes a mandatory :dir option:
{:duct.database/datalevin {:dir "./datalevin"}}This can be either a directory path, or a dtlv connection URI string.
You can also specify a schema with the :schema key:
{:duct.database/datalevin
{:dir "./datalevin"
:schema {:user/name {:db/valueType :db.type/string
:db/unique :db.unique/identity}}}}Finally, you can also use any of the options that the datalevin.core/create-conn function takes. For example:
{:duct.database/datalevin
{:dir "./datalevin"
:schema {:user/name {:db/valueType :db.type/string
:db/unique :db.unique/identity}}
:closed-schema? true}}Copyright © 2026 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.