org.postgresql.pljava.jdbc
Class SQLInputFromTuple

java.lang.Object
  extended by org.postgresql.pljava.internal.JavaWrapper
      extended by org.postgresql.pljava.jdbc.SQLInputFromTuple
All Implemented Interfaces:
SQLInput

public class SQLInputFromTuple
extends JavaWrapper
implements SQLInput

A single row, updateable ResultSet specially made for triggers. The changes made to this ResultSet are remembered and converted to a SPI_modify_tuple call prior to function return.

Author:
Thomas Hallgren

Constructor Summary
SQLInputFromTuple(long heapTupleHeaderPointer, TupleDesc tupleDesc)
           
 
Method Summary
protected  void _free(long pointer)
          Calls the C function pfree() with the given pointer as an argument.
 Array readArray()
           
 InputStream readAsciiStream()
           
 BigDecimal readBigDecimal()
           
 InputStream readBinaryStream()
           
 Blob readBlob()
           
 boolean readBoolean()
           
 byte readByte()
           
 byte[] readBytes()
           
 Reader readCharacterStream()
           
 Clob readClob()
           
 Date readDate()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 Object readObject()
           
 Ref readRef()
           
 short readShort()
           
 String readString()
           
 Time readTime()
           
 Timestamp readTimestamp()
           
 URL readURL()
           
 boolean wasNull()
           
 
Methods inherited from class org.postgresql.pljava.internal.JavaWrapper
finalize, getNativePointer
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLInputFromTuple

public SQLInputFromTuple(long heapTupleHeaderPointer,
                         TupleDesc tupleDesc)
                  throws SQLException
Throws:
SQLException
Method Detail

readArray

public Array readArray()
                throws SQLException
Specified by:
readArray in interface SQLInput
Throws:
SQLException

readAsciiStream

public InputStream readAsciiStream()
                            throws SQLException
Specified by:
readAsciiStream in interface SQLInput
Throws:
SQLException

readBigDecimal

public BigDecimal readBigDecimal()
                          throws SQLException
Specified by:
readBigDecimal in interface SQLInput
Throws:
SQLException

readBinaryStream

public InputStream readBinaryStream()
                             throws SQLException
Specified by:
readBinaryStream in interface SQLInput
Throws:
SQLException

readBlob

public Blob readBlob()
              throws SQLException
Specified by:
readBlob in interface SQLInput
Throws:
SQLException

readBoolean

public boolean readBoolean()
                    throws SQLException
Specified by:
readBoolean in interface SQLInput
Throws:
SQLException

readByte

public byte readByte()
              throws SQLException
Specified by:
readByte in interface SQLInput
Throws:
SQLException

readBytes

public byte[] readBytes()
                 throws SQLException
Specified by:
readBytes in interface SQLInput
Throws:
SQLException

readCharacterStream

public Reader readCharacterStream()
                           throws SQLException
Specified by:
readCharacterStream in interface SQLInput
Throws:
SQLException

readClob

public Clob readClob()
              throws SQLException
Specified by:
readClob in interface SQLInput
Throws:
SQLException

readDate

public Date readDate()
              throws SQLException
Specified by:
readDate in interface SQLInput
Throws:
SQLException

readDouble

public double readDouble()
                  throws SQLException
Specified by:
readDouble in interface SQLInput
Throws:
SQLException

readFloat

public float readFloat()
                throws SQLException
Specified by:
readFloat in interface SQLInput
Throws:
SQLException

readInt

public int readInt()
            throws SQLException
Specified by:
readInt in interface SQLInput
Throws:
SQLException

readLong

public long readLong()
              throws SQLException
Specified by:
readLong in interface SQLInput
Throws:
SQLException

readObject

public Object readObject()
                  throws SQLException
Specified by:
readObject in interface SQLInput
Throws:
SQLException

readRef

public Ref readRef()
            throws SQLException
Specified by:
readRef in interface SQLInput
Throws:
SQLException

readShort

public short readShort()
                throws SQLException
Specified by:
readShort in interface SQLInput
Throws:
SQLException

readString

public String readString()
                  throws SQLException
Specified by:
readString in interface SQLInput
Throws:
SQLException

readTime

public Time readTime()
              throws SQLException
Specified by:
readTime in interface SQLInput
Throws:
SQLException

readTimestamp

public Timestamp readTimestamp()
                        throws SQLException
Specified by:
readTimestamp in interface SQLInput
Throws:
SQLException

readURL

public URL readURL()
            throws SQLException
Specified by:
readURL in interface SQLInput
Throws:
SQLException

wasNull

public boolean wasNull()
                throws SQLException
Specified by:
wasNull in interface SQLInput
Throws:
SQLException

_free

protected void _free(long pointer)
Description copied from class: JavaWrapper
Calls the C function pfree() with the given pointer as an argument. Subclasses may override this method if special handling is needed when freeing up the object.

Overrides:
_free in class JavaWrapper
Parameters:
pointer - The pointer to free.