Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-632

Add mongoc_client_get_default_database

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.2-beta0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      Akin to PyMongo's MongoClient.get_default_database:

      http://api.mongodb.org/python/current/api/pymongo/mongo_client.html?highlight=get_default_database#pymongo.mongo_client.MongoClient.get_default_database

      Takes a client and returns a mongoc_database_t if the client was created with a database name in the URI, otherwise returns NULL.

      Useful because you can change the database used for operations just by changing a configured URI, without code changes.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: