Multiple databases

25 views
Skip to first unread message

Paul Viola

unread,
Jan 8, 2014, 6:52:21 PM1/8/14
to clojure...@googlegroups.com

Piece of generic feedback… and specific.

In general it is hard to use monger when you have multiple open DBs (this is something I do from time to time… moving data, or investigating a production and non-production DB side by side).

The key issue is that monger sets the DB in a global variable that is automagically shared by all functions. Sounds good at first, but a pain in some cases.

Now the specifics. Many of the functions allow you to specify the DB connection explicitly. But not all.

One key example is monger.collection/update. To be honest this looks like an oversight.

Are the maintainers motivated to take some pull requests that would fix this? (It sort of seems like this scenario is beneath your radar.)

Thanks,
Paul

Michael Klishin

unread,
Jan 9, 2014, 2:00:52 AM1/9/14
to Monger, a Clojure MongoDB driver

2014/1/9 Paul Viola <vi...@highspot.com>

The key issue is that monger sets the DB in a global variable that is automagically shared by all functions. Sounds good at first, but a pain in some cases.

Now the specifics. Many of the functions allow you to specify the DB connection explicitly. But not all.

Paul Viola

unread,
Jan 9, 2014, 7:58:12 PM1/9/14
to clojure...@googlegroups.com
Awesome.

Thank you!
Reply all
Reply to author
Forward
0 new messages