TupleDesc
Date: 2010-07-30

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.postgresql.pljava.internal
Class TupleDesc

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

    public class TupleDesc

extends JavaWrapper

The `TupleDesc` correspons to the internal PostgreSQL `TupleDesc`.

Method Summary
`protected void` | `_free(long pointer)` Calls the backend function FreeTupleDesc(TupleDesc desc)
`Tuple` | `formTuple(java.lang.Object[] values)` Creates a `Tuple` that is described by this descriptor and initialized with the supplied `values`.
`java.lang.Class` | `getColumnClass(int index)` Returns the Java class of the column at index
`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`.
`Oid` | `getOid(int index)` Returns OID of the column type.
`int` | `size()` Returns the number of columns in this tuple descriptor.

Methods inherited from class org.postgresql.pljava.internal.JavaWrapper
`finalize, getNativePointer`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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()

  Returns the number of columns in this tuple descriptor.

### getColumnClass

    public java.lang.Class getColumnClass(int index)
                                   throws java.sql.SQLException

  Returns the Java class of the column at index

  Throws:
    `java.sql.SQLException`

### getOid

    public Oid getOid(int index)
               throws java.sql.SQLException

  Returns OID of the column type.

  Throws:
    `java.sql.SQLException`

### _free

    protected void _free(long pointer)

  Calls the backend function FreeTupleDesc(TupleDesc desc)

  Overrides:
    `_free` in class `JavaWrapper`
  Parameters:
    `pointer` - The native pointer to the source TupleDesc

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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