Providing a method to return version of the currently connected mongo instance

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.11.3
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently from java driver version of the connected Mongo instance can be learn via following code snippet.

      DB db = new MongoClient("127.0.0.1").getDB("test");
      CommandResult commandResult = db.command("buildInfo");
      String serverVersion = commandResult.getString("version"));

      However similar to CLI DB class can have a method like db.getVersion() to get version of the mongo instance.

            Assignee:
            Unassigned
            Reporter:
            Fatih Güçlü Akkaya
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: