Back

-transact (clj)

(source)

protocol

(-transact this body-fn opts)
Run the `body-fn` inside a transaction.

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))))