code: public ResultSet getGeneratedKeys(Protocol protocol) throws SQLException {
      if (autoGeneratedKeys != Statement.RETURN_GENERATED_KEYS) {
        throw new SQLException(
            "Cannot return generated keys : query was not set with Statement.RETURN_GENERATED_KEYS");
      }
      if (cmdInformation != null) {
        if (batch) {
          return cmdInformation.getBatchGeneratedKeys(protocol);
        }
        return cmdInformation.getGeneratedKeys(protocol);
      }
      return SelectResultSet.createEmptyResultSet();
    }
docs: Send a resultSet that contain auto generated keys. 2 differences :
  <ol>
  <li>Batch will list all insert ids.</li>
  <li>in case of multi-query is set, resultSet will be per query. </li>
  </ol>
  
  <p>example "INSERT INTO myTable values ('a'),('b');INSERT INTO myTable values ('c'),('d'),('e')"
  will have a resultSet of 2 values, and when Statement.getMoreResults() will be called, a
  Statement.getGeneratedKeys will return a resultset with 3 ids.</p>
  
  @param protocol current protocol
  @return a ResultSet containing generated ids.
  @throws SQLException if autoGeneratedKeys was not set to Statement.RETURN_GENERATED_KEYS