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

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

    • getNativePointer

      public final long getNativePointer() throws SQLException
      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

      public String getColumnName(int index) throws SQLException
      Returns the name of the column at index.
      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

      public int getColumnIndex(String colName) throws SQLException
      Returns the index of the column named colName.
      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

      public Tuple formTuple(Object[] values) throws SQLException
      Creates a Tuple that is described by this descriptor and initialized with the supplied values.
      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

      public Class getColumnClass(int index) throws SQLException
      Returns the Java class of the column at index
      Throws:
      SQLException
    • getOid

      public Oid getOid(int index) throws SQLException
      Returns OID of the column type.
      Throws:
      SQLException