- java.lang.Object
-
- org.postgresql.pljava.internal.Tuple
-
public class Tuple extends Object
TheTuple
correspons to the internal PostgreSQLHeapTuple
.- Author:
- Thomas Hallgren
-
-
Method Summary
Modifier and Type Method Description long
getNativePointer()
Return pointer to native HeapTuple structure as a long; use only while a reference to this class is live and the THREADLOCK is held.Object
getObject(TupleDesc tupleDesc, int index, Class<?> type)
Obtains a value from the underlying nativeHeapTuple
structure.
-
-
-
Method Detail
-
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 nativeHeapTuple
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 ofgetObject
has been called; null in all the legacy cases.- Returns:
- The value or
null
. - Throws:
SQLException
- If the underlying native structure has gone stale.
-
-