Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-993

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.11.3
    • API
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: