code: protected Connection getConnection(RevisionAPIConfiguration config) throws WikiApiException
      {
          Connection c;
          try {
  
              String driverDB = config.getDatabaseDriver();
              Class.forName(driverDB);
  
              c = DriverManager.getConnection(config.getJdbcURL(), config.getUser(), config.getPassword());
              if (!c.isValid(5)) {
                  throw new WikiApiException("Connection could not be established.");
              }
          }
          catch (SQLException | ClassNotFoundException e) {
              throw new WikiApiException(e);
          }
  
          return c;
      }
docs: Helper method to obtain a connection via the given {@link RevisionAPIConfiguration} parameter.
  @param config Must not be {@code null}.
  @return A valid {@link Connection} to the database endpoint.
  @throws WikiApiException Thrown if errors occurred while opening a connection.