org.postgresql.pljava.internal
Class Tuple

java.lang.Object
  extended by org.postgresql.pljava.internal.JavaWrapper
      extended by org.postgresql.pljava.internal.Tuple

public class Tuple
extends JavaWrapper

The Tuple correspons to the internal PostgreSQL HeapTuple.

Author:
Thomas Hallgren

Method Summary
protected  void _free(long pointer)
          Calls the backend function heap_freetuple(HeapTuple tuple)
 Object getObject(TupleDesc tupleDesc, int index)
          Obtains a value from the underlying native HeapTuple structure.
 
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
 

Method Detail

getObject

public Object getObject(TupleDesc tupleDesc,
                        int index)
                 throws SQLException
Obtains a value from the underlying native HeapTuple structure.

Parameters:
tupleDesc - The Tuple descriptor for this instance.
index - Index of value in the structure (one based).
Returns:
The value or null.
Throws:
SQLException - If the underlying native structure has gone stale.

_free

protected void _free(long pointer)
Calls the backend function heap_freetuple(HeapTuple tuple)

Overrides:
_free in class JavaWrapper
Parameters:
pointer - The native pointer to the source HeapTuple