groovy.sql
Interface GroovyResultSet

All Superinterfaces:
GroovyObject, ResultSet

public interface GroovyResultSet
extends GroovyObject, ResultSet

Represents an extent of objects

Version:
$Revision: 7922 $
Author:
James Strachan, Ivan Ganza, Chris Stevenson

Field Summary
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
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.
 void putAt(int index, Object newValue)
          Supports integer based subscript operators for updating the values of numbered columns starting at zero.
 
Methods inherited from interface groovy.lang.GroovyObject
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty
 
Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
 

Method Detail

getAt

Object getAt(int index)
             throws SQLException
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.

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
Throws:
SQLException - if a database error occurs

putAt

void putAt(int index,
           Object newValue)
           throws SQLException
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.

Parameters:
index - is the number of the column to look at starting at 1
newValue - the new value for this index
Throws:
SQLException - if a database error occurs

add

void add(Map values)
         throws SQLException
Adds a new row to this result set

Parameters:
values - teh new values to add
Throws:
SQLException - if a database error occurs

eachRow

void eachRow(Closure closure)
             throws SQLException
Call the closure once for each row in the result set.

Parameters:
closure - the closure to call for each row
Throws:
SQLException - if a database error occurs

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