java.lang.Object
org.postgresql.pljava.internal.Tuple

public class Tuple extends Object
The Tuple correspons to the internal PostgreSQL HeapTuple.
Author:
Thomas Hallgren
  • Method Details

    • getNativePointer

      public final long getNativePointer() throws SQLException
      Return pointer to native HeapTuple structure as a long; use only while a reference to this class is live and the THREADLOCK is held.
      Throws:
      SQLException
    • getObject

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

      Conversion to a JDBC 4.1 specified class is best effort, if the native type system knows how to do so; otherwise, the return value can be whatever would have been returned in the legacy case. Caller beware!

      Parameters:
      tupleDesc - The Tuple descriptor for this instance.
      index - Index of value in the structure (one based).
      type - Desired Java class of the result, if the JDBC 4.1 version of getObject has been called; null in all the legacy cases.
      Returns:
      The value or null.
      Throws:
      SQLException - If the underlying native structure has gone stale.