String getFormattedDb() {
    if (!getOpts().getShowDbInPrompt()) {
      return "";
    }
    String currDb = getCurrentDatabase();

    if (currDb == null) {
      return "";
    }

    return " (" + currDb + ")";
  }
Retrieve the current database name string to display, based on the
configuration value.

@return String to show user for current db value
beeline/src/java/org/apache/hive/beeline/BeeLine.java