A Duct module that adds a SQL database connection pool and Ragtime migrations to a configuration.
To install, add the following to your project :dependencies
:
[duct/module.sql "0.4.2"]
To add this module to your configuration, add the :duct.module/sql
key:
{:duct.module/sql {}}
By default the module looks for a database URL in the
JDBC_DATABASE_URL
and DATABASE_URL
environment variables, but you
can specify it directly by setting the :database-url
key:
{:duct.module/sql {:database-url "jdbc:sqlite:db/example.sqlite"}}
To add migrations:
{:duct.migrator/ragtime {:migrations [#ig/ref :example.migration/create-foo]}}
See migrator.ragtime for more information.
Copyright © 2017 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 is a website building & hosting documentation for Clojure/Script libraries
× close