code: public GroovyRowResult firstRow(String sql, List<Object> params) throws SQLException {
          List<GroovyRowResult> rows = null;
          try {
              rows = rows(sql, params, 1, 1, null);
          }
          //should be SQLFeatureNotSupportedException instead once we move to Java 1.6
          catch (SQLException featureNotSupportedException) {
              rows = rows(sql, params);
          }
          if (rows.isEmpty()) return null;
          return rows.get(0);
      }
docs: Performs the given SQL query and return the first row of the result set.
  The query may contain placeholder question marks which match the given list of parameters.
  <p>
  Example usages:
  <pre>
  def ans = sql.firstRow("select * from PERSON where lastname like ?", ['%a%'])
  println ans.firstname
  </pre>
  If your database returns scalar functions as ResultSets, you can also use firstRow
  to gain access to stored procedure results, e.g. using hsqldb 1.9 RC4:
  <pre>
  sql.execute """
  create function FullName(p_firstname VARCHAR(40)) returns VARCHAR(80)
  BEGIN atomic
  DECLARE ans VARCHAR(80);
  SET ans = (SELECT firstname || ' ' || lastname FROM PERSON WHERE firstname = p_firstname);
  RETURN ans;
  END
  """
  
  assert sql.firstRow("{call FullName(?)}", ['Sam'])[0] == 'Sam Pullara'
  </pre>
  <p>
  This method supports named and named ordinal parameters by supplying such
  parameters in the <code>params</code> list. See the class Javadoc for more details.
  <p>
  Resource handling is performed automatically where appropriate.
  
  @param sql    the SQL statement
  @param params a list of parameters
  @return a GroovyRowResult object or <code>null</code> if no row is found
  @throws SQLException if a database access error occurs