Groovy Documentation

groovy.sql
[Java] Interface GroovyResultSet

groovy.lang.GroovyObject
  java.lang.AutoCloseable
      java.sql.Wrapper
          groovy.sql.GroovyResultSet
All Superinterfaces:
GroovyObject, java.lang.AutoCloseable, java.sql.Wrapper

public interface GroovyResultSet
extends GroovyObject, java.sql.ResultSet

Represents an extent of objects

Authors:
James Strachan
Ivan Ganza
Chris Stevenson
Version:
\$Revision\$


Field Summary
 
Fields inherited from interface java.sql.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(java.util.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.

java.lang.Object getAt(int index)

Supports integer-based subscript operators for accessing at numbered columns starting at zero.

java.lang.Object getAt(java.lang.String columnName)

Gets the value of the designated column in the current row as an Object.

void putAt(int index, java.lang.Object newValue)

Supports integer based subscript operators for updating the values of numbered columns starting at zero.

void putAt(java.lang.String columnName, java.lang.Object newValue)

Updates the designated column with an Object value.

 
Methods inherited from interface GroovyObject
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty
 
Methods inherited from interface java.sql.ResultSet
java.sql.ResultSet#insertRow(), java.sql.ResultSet#findColumn(java.lang.String), java.sql.ResultSet#absolute(int), java.sql.ResultSet#afterLast(), java.sql.ResultSet#beforeFirst(), java.sql.ResultSet#cancelRowUpdates(), java.sql.ResultSet#clearWarnings(), java.sql.ResultSet#deleteRow(), java.sql.ResultSet#getAsciiStream(int), java.sql.ResultSet#getAsciiStream(java.lang.String), java.sql.ResultSet#getBinaryStream(int), java.sql.ResultSet#getBinaryStream(java.lang.String), java.sql.ResultSet#getBlob(java.lang.String), java.sql.ResultSet#getBlob(int), java.sql.ResultSet#getCharacterStream(java.lang.String), java.sql.ResultSet#getCharacterStream(int), java.sql.ResultSet#getClob(java.lang.String), java.sql.ResultSet#getClob(int), java.sql.ResultSet#getConcurrency(), java.sql.ResultSet#getCursorName(), java.sql.ResultSet#getFetchDirection(), java.sql.ResultSet#getFetchSize(), java.sql.ResultSet#getHoldability(), java.sql.ResultSet#getMetaData(), java.sql.ResultSet#getNCharacterStream(java.lang.String), java.sql.ResultSet#getNCharacterStream(int), java.sql.ResultSet#getNClob(int), java.sql.ResultSet#getNClob(java.lang.String), java.sql.ResultSet#getNString(java.lang.String), java.sql.ResultSet#getNString(int), java.sql.ResultSet#getRow(), java.sql.ResultSet#getRowId(java.lang.String), java.sql.ResultSet#getRowId(int), java.sql.ResultSet#getSQLXML(int), java.sql.ResultSet#getSQLXML(java.lang.String), java.sql.ResultSet#getStatement(), java.sql.ResultSet#getUnicodeStream(int), java.sql.ResultSet#getUnicodeStream(java.lang.String), java.sql.ResultSet#getWarnings(), java.sql.ResultSet#isAfterLast(), java.sql.ResultSet#isBeforeFirst(), java.sql.ResultSet#isFirst(), java.sql.ResultSet#isLast(), java.sql.ResultSet#moveToCurrentRow(), java.sql.ResultSet#moveToInsertRow(), java.sql.ResultSet#refreshRow(), java.sql.ResultSet#rowDeleted(), java.sql.ResultSet#rowInserted(), java.sql.ResultSet#rowUpdated(), java.sql.ResultSet#setFetchDirection(int), java.sql.ResultSet#setFetchSize(int), java.sql.ResultSet#updateArray(int, java.sql.Array), java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array), java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, long), java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int), java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream), java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, int), java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream), java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, long), java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal), java.sql.ResultSet#updateBigDecimal(java.lang.String, java.math.BigDecimal), java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, int), java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream), java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream), java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int), java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, long), java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, long), java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob), java.sql.ResultSet#updateBlob(int, java.sql.Blob), java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream, long), java.sql.ResultSet#updateBlob(int, java.io.InputStream), java.sql.ResultSet#updateBlob(int, java.io.InputStream, long), java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream), java.sql.ResultSet#updateBoolean(int, boolean), java.sql.ResultSet#updateBoolean(java.lang.String, boolean), java.sql.ResultSet#updateByte(int, byte), java.sql.ResultSet#updateByte(java.lang.String, byte), java.sql.ResultSet#updateBytes(java.lang.String, [B), java.sql.ResultSet#updateBytes(int, [B), java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, int), java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, long), java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, int), java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader), java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, long), java.sql.ResultSet#updateCharacterStream(int, java.io.Reader), java.sql.ResultSet#updateClob(int, java.io.Reader, long), java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob), java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader, long), java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader), java.sql.ResultSet#updateClob(int, java.sql.Clob), java.sql.ResultSet#updateClob(int, java.io.Reader), java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date), java.sql.ResultSet#updateDate(int, java.sql.Date), java.sql.ResultSet#updateDouble(int, double), java.sql.ResultSet#updateDouble(java.lang.String, double), java.sql.ResultSet#updateFloat(java.lang.String, float), java.sql.ResultSet#updateFloat(int, float), java.sql.ResultSet#updateInt(int, int), java.sql.ResultSet#updateInt(java.lang.String, int), java.sql.ResultSet#updateLong(java.lang.String, long), java.sql.ResultSet#updateLong(int, long), java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader), java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader), java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader, long), java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader, long), java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader), java.sql.ResultSet#updateNClob(int, java.io.Reader, long), java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader, long), java.sql.ResultSet#updateNClob(int, java.io.Reader), java.sql.ResultSet#updateNClob(int, java.sql.NClob), java.sql.ResultSet#updateNClob(java.lang.String, java.sql.NClob), java.sql.ResultSet#updateNString(java.lang.String, java.lang.String), java.sql.ResultSet#updateNString(int, java.lang.String), java.sql.ResultSet#updateNull(java.lang.String), java.sql.ResultSet#updateNull(int), java.sql.ResultSet#updateObject(int, java.lang.Object), java.sql.ResultSet#updateObject(int, java.lang.Object, int), java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object), java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, int), java.sql.ResultSet#updateRef(int, java.sql.Ref), java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref), java.sql.ResultSet#updateRow(), java.sql.ResultSet#updateRowId(int, java.sql.RowId), java.sql.ResultSet#updateRowId(java.lang.String, java.sql.RowId), java.sql.ResultSet#updateSQLXML(int, java.sql.SQLXML), java.sql.ResultSet#updateSQLXML(java.lang.String, java.sql.SQLXML), java.sql.ResultSet#updateShort(java.lang.String, short), java.sql.ResultSet#updateShort(int, short), java.sql.ResultSet#updateString(java.lang.String, java.lang.String), java.sql.ResultSet#updateString(int, java.lang.String), java.sql.ResultSet#updateTimestamp(java.lang.String, java.sql.Timestamp), java.sql.ResultSet#updateTimestamp(int, java.sql.Timestamp), java.sql.ResultSet#wasNull(), java.sql.ResultSet#getObject(int, java.lang.Class), java.sql.ResultSet#getObject(int), java.sql.ResultSet#getObject(java.lang.String, java.util.Map), java.sql.ResultSet#getObject(int, java.util.Map), java.sql.ResultSet#getObject(java.lang.String, java.lang.Class), java.sql.ResultSet#getObject(java.lang.String), java.sql.ResultSet#getBoolean(java.lang.String), java.sql.ResultSet#getBoolean(int), java.sql.ResultSet#getByte(int), java.sql.ResultSet#getByte(java.lang.String), java.sql.ResultSet#getShort(java.lang.String), java.sql.ResultSet#getShort(int), java.sql.ResultSet#getInt(int), java.sql.ResultSet#getInt(java.lang.String), java.sql.ResultSet#getLong(int), java.sql.ResultSet#getLong(java.lang.String), java.sql.ResultSet#getFloat(java.lang.String), java.sql.ResultSet#getFloat(int), java.sql.ResultSet#getDouble(int), java.sql.ResultSet#getDouble(java.lang.String), java.sql.ResultSet#getBytes(java.lang.String), java.sql.ResultSet#getBytes(int), java.sql.ResultSet#getArray(java.lang.String), java.sql.ResultSet#getArray(int), java.sql.ResultSet#next(), java.sql.ResultSet#getURL(java.lang.String), java.sql.ResultSet#getURL(int), java.sql.ResultSet#close(), java.sql.ResultSet#getType(), java.sql.ResultSet#previous(), java.sql.ResultSet#getRef(java.lang.String), java.sql.ResultSet#getRef(int), java.sql.ResultSet#getString(java.lang.String), java.sql.ResultSet#getString(int), java.sql.ResultSet#getDate(int, java.util.Calendar), java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar), java.sql.ResultSet#getDate(java.lang.String), java.sql.ResultSet#getDate(int), java.sql.ResultSet#getTime(int), java.sql.ResultSet#getTime(java.lang.String), java.sql.ResultSet#getTime(int, java.util.Calendar), java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar), java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar), java.sql.ResultSet#getTimestamp(int, java.util.Calendar), java.sql.ResultSet#getTimestamp(java.lang.String), java.sql.ResultSet#getTimestamp(int), java.sql.ResultSet#first(), java.sql.ResultSet#last(), java.sql.ResultSet#relative(int), java.sql.ResultSet#updateTime(int, java.sql.Time), java.sql.ResultSet#updateTime(java.lang.String, java.sql.Time), java.sql.ResultSet#getBigDecimal(int), java.sql.ResultSet#getBigDecimal(java.lang.String), java.sql.ResultSet#getBigDecimal(java.lang.String, int), java.sql.ResultSet#getBigDecimal(int, int), java.sql.ResultSet#isClosed(), java.sql.ResultSet#isWrapperFor(java.lang.Class), java.sql.ResultSet#unwrap(java.lang.Class)
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

add

public void add(java.util.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 java.lang.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 java.lang.Object getAt(java.lang.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, java.lang.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(java.lang.String columnName, java.lang.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


 

Groovy Documentation