conman
conman copied to clipboard
New option to wrap database hits
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.
seems like a good idea, this could work like Ring midleware