org.postgresql.pljava.jdbc

Class SingleRowWriter

Implemented Interfaces:
ResultSet

public class SingleRowWriter
extends SingleRowResultSet

A single row, updateable ResultSet, specially made for functions and procedures that returns complex types or sets.

Constructor Summary

SingleRowWriter(TupleDesc tupleDesc)

Method Summary

void
cancelRowUpdates()
void
close()
Cancels all changes but doesn't really close the set.
void
copyRowFrom(ResultSet rs)
protected Object
getObjectValue(int columnIndex)
long
getTupleAndClear()
Creates a tuple from the current row values and then cancel all row updates to prepare for a new row.
protected TupleDesc
getTupleDesc()
boolean
rowUpdated()
Returns true if the row contains any non null values since all values of the row are null initially.
void
updateObject(int columnIndex, Object x)

Methods inherited from class org.postgresql.pljava.jdbc.SingleRowResultSet

absolute, afterLast, beforeFirst, deleteRow, findColumn, first, getConcurrency, getFetchDirection, getFetchSize, getMetaData, getRow, getTupleDesc, getType, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, relative, rowDeleted, rowInserted, setFetchDirection, setFetchSize, updateObject, updateRow

Methods inherited from class org.postgresql.pljava.jdbc.ObjectResultSet

clearWarnings, getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getMetaData, getNumber, getObject, getObject, getObjectValue, getObjectValue, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getURL, getUnicodeStream, getValue, getValue, getWarnings, refreshRow, updateArray, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNull, updateRef, updateShort, updateString, updateTime, updateTimestamp, wasNull

Methods inherited from class org.postgresql.pljava.jdbc.AbstractResultSet

getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getCursorName, getDate, getDate, getDouble, getFloat, getInt, getLong, getObject, getObject, getRef, getShort, getStatement, getString, getTime, getTime, getTimestamp, getTimestamp, getURL, getUnicodeStream, updateArray, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNull, updateObject, updateObject, updateRef, updateShort, updateString, updateTime, updateTimestamp

Constructor Details

SingleRowWriter

public SingleRowWriter(TupleDesc tupleDesc)
            throws SQLException

Method Details

cancelRowUpdates

public void cancelRowUpdates()
            throws SQLException

close

public void close()
            throws SQLException
Cancels all changes but doesn't really close the set.

copyRowFrom

public void copyRowFrom(ResultSet rs)
            throws SQLException

getObjectValue

protected Object getObjectValue(int columnIndex)
            throws SQLException
Overrides:
getObjectValue in interface ObjectResultSet

getTupleAndClear

public long getTupleAndClear()
            throws SQLException
Creates a tuple from the current row values and then cancel all row updates to prepare for a new row. This method is called automatically by the trigger handler and should not be called in any other way.
Returns:
The native pointer of the Tuple reflecting the current row values.

getTupleDesc

protected final TupleDesc getTupleDesc()
Overrides:
getTupleDesc in interface SingleRowResultSet

rowUpdated

public boolean rowUpdated()
            throws SQLException
Returns true if the row contains any non null values since all values of the row are null initially.

updateObject

public void updateObject(int columnIndex,
                         Object x)
            throws SQLException

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT