I have two questions.
First, the MongoDB documentation constantly refers to using db.open() and then db.collection(), but i have noticed that i'm still able to work with the api even without first calling db.open(). Is it safe to do so? Is the api internally calling db.open()?
http://mongodb.github.com/node-mongodb-native/api-generated/db.html#collection
Second, is there a param in the db object that specifies if db.open() was called? If not, how else could i find out if db.open() was called?
The reasoning is because i have built several functions that communicate with mongo, but when some of the functions interact with each other, i get errors that the database cant be 'opened' multiple times.
EDIT
I found this param in the db object. It appears this is a bool determining the use of the db.open() but im not 100% sure, does anyone know? db.serverConfig.internalMaster