Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.10
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## groovy.sql
[Java] Interface GroovyResultSet

    groovy.sql.GroovyResultSet
      java.lang.AutoCloseable
          java.sql.Wrapper
              groovy.lang.GroovyObject

All Superinterfaces:
  GroovyObject

    public interface GroovyResultSet
    extends GroovyObject, ResultSet

Represents an extent of objects

Authors:
  James Strachan
  Ivan Ganza
  Chris Stevenson

Version:
  \$Revision: 16403 \$

Field Summary

Fields inherited from interface ResultSet
FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE, CONCUR_READ_ONLY, CONCUR_UPDATABLE, HOLD_CURSORS_OVER_COMMIT, CLOSE_CURSORS_AT_COMMIT

Method Summary
`void` | `add(Map values)` Adds a new row to this result set
`void` | `eachRow(Closure closure)` Call the closure once for each row in the result set.
`Object` | `getAt(int index)` Supports integer-based subscript operators for accessing at numbered columns starting at zero.
`Object` | `getAt(String columnName)` Gets the value of the designated column in the current row as an `Object`.
`void` | `putAt(int index, Object newValue)` Supports integer based subscript operators for updating the values of numbered columns starting at zero.
`void` | `putAt(String columnName, Object newValue)` Updates the designated column with an `Object` value.

Methods inherited from interface ResultSet
getObject, getObject, getObject, getObject, getObject, getObject, getBoolean, getBoolean, getByte, getByte, getShort, getShort, getInt, getInt, getLong, getLong, getFloat, getFloat, getDouble, getDouble, getBytes, getBytes, getArray, getArray, next, getURL, getURL, close, getType, previous, getRef, getRef, getString, getString, first, last, getDate, getDate, getDate, getDate, getTime, getTime, getTime, getTime, isClosed, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getCharacterStream, getCharacterStream, relative, updateTime, updateTime, updateBytes, updateBytes, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, updateTimestamp, updateTimestamp, findColumn, absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, getAsciiStream, getAsciiStream, getBinaryStream, getBinaryStream, getBlob, getBlob, getClob, getClob, getConcurrency, getCursorName, getFetchDirection, getFetchSize, getHoldability, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRow, getRowId, getRowId, getSQLXML, getSQLXML, getStatement, getUnicodeStream, getUnicodeStream, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, moveToCurrentRow, moveToInsertRow, refreshRow, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateSQLXML, updateSQLXML, updateShort, updateShort, updateString, updateString, wasNull, unwrap, isWrapperFor

Methods inherited from interface GroovyObject
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty

Method Detail

### add

    public void add(Map values)

  Adds a new row to this result set
  throws:
    SQLException if a database error occurs
  Parameters:
    `values` - the new values to add

### eachRow

    public void eachRow(Closure closure)

  Call the closure once for each row in the result set.
  throws:
    SQLException if a database error occurs
  Parameters:
    `closure` - the closure to call for each row

### getAt

    public Object getAt(int index)

  Supports integer-based subscript operators for accessing at numbered columns starting at zero. Negative indices are supported, they will count from the last column backwards.
  throws:
    SQLException if a database error occurs
  Parameters:
    `index` - is the number of the column to look at starting at 1
  Returns:
    the object for this index in the current result set

### getAt

    public Object getAt(String columnName)

  Gets the value of the designated column in the current row as an `Object`.
  throws:
    groovy.lang.MissingPropertyException if an SQLException happens while getting the object
  Parameters:
    `columnName` - the SQL name of the column
  Returns:
    the returned column value

### putAt

    public void putAt(int index, Object newValue)

  Supports integer based subscript operators for updating the values of numbered columns starting at zero. Negative indices are supported, they will count from the last column backwards.
  throws:
    SQLException if a database error occurs
  Parameters:
    `index` - is the number of the column to look at starting at 1
    `newValue` - the new value for this index

### putAt

    public void putAt(String columnName, Object newValue)

  Updates the designated column with an `Object` value.
  throws:
    groovy.lang.MissingPropertyException if an SQLException happens while setting the new value
  Parameters:
    `columnName` - the SQL name of the column
    `newValue` - the updated value

Copyright © 2003-2010 The Codehaus. All rights reserved.