String getPromptForBeeline() {
    if (getDatabaseConnection() == null || getDatabaseConnection().getUrl() == null) {
      return "beeline> ";
    } else {
      String printClosed = getDatabaseConnection().isClosed() ? " (closed)" : "";
      return getPromptForBeeline(getDatabaseConnections().getIndex()
          + ": " + getDatabaseConnection().getUrl()) + printClosed + getFormattedDb() + "> ";
    }
  }
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