 (ns puppetlabs.puppetdb.jdbc
   "Database utilities"
   (:import (com.zaxxer.hikari HikariDataSource HikariConfig)
+           [java.sql Connection SQLException]
            (java.util.concurrent TimeUnit))
   (:require [clojure.java.jdbc :as sql]
             [clojure.string :as string]

   If there are still retries to perform, returns false."
  [remaining :- s/Int
   current :- s/Int
   exception]
  (cond
   (zero? remaining)
   (do

  (sql/db-do-prepared *db* true (into [sql] params) {:multi? true}))

(defn do-commands-outside-txn [& commands]
  (let [^Connection conn (:connection *db*)
        orig (.getAutoCommit conn)]
    (.setAutoCommit conn true)
    (try
