conman icon indicating copy to clipboard operation
conman copied to clipboard

New option to wrap database hits

Open vermiculus opened this issue 9 years ago • 1 comments

It would be really nice if a function could be provided to conman/bind-connection that would wrap database-touching functions.

Something like

(conman/bind-connection *db*
  {:wrapper-func log-it}
  "sql/queries.sql")

where a theoretical create-user! call would be defined as

(defn create-user! [map]
  (REAL-create-user (log-it map)))

or something to that effect.

vermiculus avatar May 03 '16 19:05 vermiculus

seems like a good idea, this could work like Ring midleware

yogthos avatar May 03 '16 20:05 yogthos