 (defonce ^:private default-quoting-style (atom :ansi))
 
 (def ^:dynamic *quoting-style*
-  "Bind this to override the identifier quoting style.
-   Provided for cases where you want to override the quoting style (such as when connecting to a different DB)
-   without changing the default value."
+  "Bind this to override the identifier quoting style. Provided for cases where you want to override the quoting
+  style (such as when connecting to a different DB) without changing the default value."
   nil)
 
 (defn set-default-quoting-style!
-  "Set the default quoting style that should be used to quote identifiers.
-   Defaults to `:ansi`, but you can instead set it to `:mysql` or `:sqlserver`."
+  "Set the default quoting style that should be used to quote identifiers. Defaults to `:ansi`, but you can instead set
+  it to `:mysql` or `:sqlserver`."
   [new-quoting-style]
   (reset! default-quoting-style new-quoting-style))
 
 (defn quoting-style
-  "Fetch the HoneySQL quoting style that should be used to quote identifiers.
-   One of `:ansi`, `:mysql`, or `:sqlserver`.
-
-   Returns the value of `*quoting-style*` if it is bound, otherwise returns the default quoting style,
-   which is normally `:ansi`; this can be changed by calling `set-default-quoting-style!`."
+  "Fetch the HoneySQL quoting style that should be used to quote identifiers. One of `:ansi`, `:mysql`, or `:sqlserver`.
+
+  Returns the value of `*quoting-style*` if it is bound, otherwise returns the default quoting style, which is
+  normally `:ansi`; this can be changed by calling `set-default-quoting-style!`."
   ^clojure.lang.Keyword []
   (or *quoting-style*
       @default-quoting-style))

    (f (partial deref *call-count*))))

(defmacro with-call-counting
  "Execute BODY and track the number of DB calls made inside it. CALL-COUNT-FN-BINDING is bound to a zero-arity
   function that can be used to fetch the current DB call count.

     (db/with-call-counting [call-count]
       ...
       (call-count))"
  {:style/indent 1}
  [[call-count-fn-binding] & body]
  `(-do-with-call-counting (fn [~call-count-fn-binding] ~@body)))

(defmacro debug-count-calls
  "Print the number of DB calls executed inside BODY to `stdout`. Intended for use during REPL development."
  {:style/indent 0}
  [& body]
  `(with-call-counting [call-count#]

  (not (nil? (find-protocol-method models/IModel methodk model))))

(defn update!
  "Update a single row in the database. Returns `true` if a row was affected, `false` otherwise. Accepts either a single
  map of updates to make or kwargs. `entity` is automatically resolved, and `pre-update` is called on `kvs` before the
  object is inserted into the database.

     (db/update! 'Label 11 :name \"ToucanFriendly\")
     (db/update! 'Label 11 {:name \"ToucanFriendly\"})"
