项目作者: duct-framework

项目描述 :
Integrant methods for connecting to a SQL database
高级语言: Clojure
项目地址: git://github.com/duct-framework/database.sql.git
创建时间: 2017-03-09T22:25:29Z
项目社区:https://github.com/duct-framework/database.sql

开源协议:

下载


Duct database.sql Build Status

Integrant methods for connecting to a SQL database from the
Duct framework.

For pooled connections, use database.sql.hikaricp.

Installation

Add the following dependency to your deps.edn file:

  1. org.duct-framework/database.sql {:mvn/version "0.4.0"}

Or to your Leiningen project file:

  1. [org.duct-framework/database.sql "0.4.0"]

Usage

This library provides an init-key method for :duct.database/sql that
creates a DataSource. The key takes the same argument map as the
get-datasource function from next.jdbc.

  1. {:duct.database/sql {:jdbcUrl "jdbc:sqlite:db/example.sqlite"}}

When you write functions against the database, consider using a
protocol and extending the DataSource class. This will allow you to
easily mock or stub out the database using a tool like Shrubbery.

License

Copyright © 2024 James Reeves

Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.