Back
Transactable (clj)
(source)protocol
Protocol for running SQL operations in a transaction.
Implementations are provided for `Connection`, `DataSource`, and `Object`
(on the assumption that an `Object` can be turned into a `DataSource`).
Examples
seancorfield/next-jdbc
(ns ^:no-doc next.jdbc.default-options
"Implementation of default options logic."
(:require [next.jdbc.protocols :as p]))
(extend-protocol p/Transactable
DefaultOptions
(-transact [this body-fn opts]
(p/-transact (:connectable this) body-fn
(merge (:options this) opts))))