Is there a way to check for the existence of Mongo Database via Java API without creating the database on initiating the call?
I am currently using Casbah (Scala Driver) to interact with our Mongo Instance
val mongo = MongoConnection(List(new ServerAddress("localhost",27017)))
val db = mongo.getDB("testXXX")
The API getDB
seems to create a database by default and I would not want this to occur
If testXXX
does not exist, I would NOT want Mongo to create a database but instead let me as the consumer decide whether it exists
Is there such an API via MongoDB java driver or Casbah?