java.lang.Object
org.postgresql.pljava.internal.TupleDesc
The
TupleDesc
correspons to the internal PostgreSQL
TupleDesc
.- Author:
- Thomas Hallgren
-
Method Summary
Modifier and TypeMethodDescriptionCreates aTuple
that is described by this descriptor and initialized with the suppliedvalues
.getColumnClass
(int index) Returns the Java class of the column at indexint
getColumnIndex
(String colName) Returns the index of the column namedcolName
.getColumnName
(int index) Returns the name of the column atindex
.final long
Return pointer to native TupleDesc structure as a long; use only while a reference to this class is live and the THREADLOCK is held.getOid
(int index) Returns OID of the column type.int
size()
Returns the number of columns in this tuple descriptor.
-
Method Details
-
getNativePointer
Return pointer to native TupleDesc structure as a long; use only while a reference to this class is live and the THREADLOCK is held.- Throws:
SQLException
-
getColumnName
Returns the name of the column atindex
.- Parameters:
index
- The one based index of the column.- Returns:
- The name of the column.
- Throws:
SQLException
- If the index is out of range for this tuple descriptor.
-
getColumnIndex
Returns the index of the column namedcolName
.- Parameters:
colName
- The name of the column.- Returns:
- The index for column
colName
. - Throws:
SQLException
- If no column with the given name can be found in this tuple descriptor.
-
formTuple
Creates aTuple
that is described by this descriptor and initialized with the suppliedvalues
.- Returns:
- The created
Tuple
. - Throws:
SQLException
- If the length of the values array does not match the size of the descriptor or if the handle of this descriptor has gone stale.
-
size
public int size()Returns the number of columns in this tuple descriptor. -
getColumnClass
Returns the Java class of the column at index- Throws:
SQLException
-
getOid
Returns OID of the column type.- Throws:
SQLException
-