jaceklaskowski / librarian-clojure

Book manager in Clojure
http://librarian-clojure.herokuapp.com/
22 stars 4 forks source link

Use set-connection! in librarian-clojure.db #33

Closed zoldar closed 11 years ago

zoldar commented 11 years ago

I thought that the code there could be made a bit less cluttered using congomongo's global connection handling (using set-connection! etc.). Every database related operation starts with assertion assuring that connection exists, so all those (when database-connection ..) checks would be rather redundant (it should blow up as soon as possible anyway). Are there any particular obejctions to such way of handling db connectivity?

jaceklaskowski commented 11 years ago

If it doesn't break the code, and is the right way to handle db connections, I'm fine with the proposal. Show the code and it's gonna be easier to decide.

zoldar commented 11 years ago

I've sent a pull request with proposed changes. Externally, behavior remains unchanged.