Global connection in 2.x?

24 views
Skip to first unread message

Jakub Arnold

unread,
Apr 5, 2015, 4:35:52 PM4/5/15
to clojure...@googlegroups.com
Is there a way to get back the global connection style from 1.x, where I could simply do

    (monger.core/connect!)
    (monger.core/use-db! "foobar")

and then be able to query anywhere without having to pass the db explicitly?

Michael Klishin

unread,
Apr 5, 2015, 4:37:39 PM4/5/15
to clojure...@googlegroups.com, Jakub Arnold
No, because allowing that was a pretty terrible idea. You can fairly easily
do the same with a few wrapper functions (but we highly not recommend it — use
Component instead ).
--
@michaelklishin, github.com/michaelklishin
Reply all
Reply to author
Forward
0 new messages