org.postgresql.pljava.internal
Class TupleDesc

java.lang.Object
  extended byorg.postgresql.pljava.internal.NativeStruct
      extended byorg.postgresql.pljava.internal.TupleDesc

public class TupleDesc
extends NativeStruct

The TupleDesc correspons to the internal PostgreSQL TupleDesc.


Constructor Summary
TupleDesc()
           
 
Method Summary
 Tuple formTuple(java.lang.Object[] values)
          Creates a Tuple that is described by this descriptor and initialized with the supplied values.
 int getColumnIndex(java.lang.String colName)
          Returns the index of the column named colName.
 java.lang.String getColumnName(int index)
          Returns the name of the column at index.
 int size()
          Returns the number of columns in this tuple descriptor.
 
Methods inherited from class org.postgresql.pljava.internal.NativeStruct
getNative, invalidate, isValid, releasePointer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleDesc

public TupleDesc()
Method Detail

getColumnName

public java.lang.String getColumnName(int index)
                               throws java.sql.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:
java.sql.SQLException - If the index is out of range for this tuple descriptor.

getColumnIndex

public int getColumnIndex(java.lang.String colName)
                   throws java.sql.SQLException
Returns the index of the column named colName.

Parameters:
colName - The name of the column.
Returns:
The index for column colName.
Throws:
java.sql.SQLException - If no column with the given name can be found in this tuple descriptor.

formTuple

public Tuple formTuple(java.lang.Object[] values)
                throws java.sql.SQLException
Creates a Tuple that is described by this descriptor and initialized with the supplied values.

Returns:
The created Tuple.
Throws:
java.sql.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()
         throws java.sql.SQLException
Returns the number of columns in this tuple descriptor.

Throws:
java.sql.SQLException


Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. Distributed under the terms shown in COPYRIGHT