-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
I have a use case in which I would like to check for the existence of a collection without creating a new one automatically if it already exists.
I am new to MongoDB, but I'm proposing a change to DB.java to add this functionality.
I've updated to include:
public boolean collectionExists(String collectionName)
and the test for it in DBTest.java.
The attached patch includes the changes (created from my github fork of the driver project).
Please consider it for inclusion.
Thanks!