next-jdbc/src/next/jdbc/protocols.clj

18 lines
519 B
Clojure
Raw Normal View History

2019-03-31 23:54:34 +00:00
;; copyright (c) 2018-2019 Sean Corfield, all rights reserved
(ns next.jdbc.protocols
"")
(set! *warn-on-reflection* true)
(defprotocol Sourceable
(get-datasource ^javax.sql.DataSource [this]))
(defprotocol Connectable
(get-connection ^java.lang.AutoCloseable [this opts]))
(defprotocol Executable
(-execute ^clojure.lang.IReduceInit [this sql-params opts]))
(defprotocol Preparable
(prepare ^java.sql.PreparedStatement [this sql-params opts]))
(defprotocol Transactable
(-transact [this body-fn opts]))