Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New option to wrap database hits #19

Open
vermiculus opened this issue May 3, 2016 · 1 comment
Open

New option to wrap database hits #19

vermiculus opened this issue May 3, 2016 · 1 comment

Comments

@vermiculus
Copy link

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 vermiculus changed the title New option to log database hits New option to wrap database hits May 3, 2016
@yogthos
Copy link
Member

yogthos commented May 3, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants