org.postgresql.pljava.internal

Class 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(Object[] values)
Creates a Tuple that is described by this descriptor and initialized with the supplied values.
Class
getColumnClass(int index)
Returns the Java class of the column at index
int
getColumnIndex(String colName)
Returns the index of the column named colName.
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

_free, finalize, getNativePointer

Method Details

_free

protected void _free(long pointer)
Calls the backend function FreeTupleDesc(TupleDesc desc)
Overrides:
_free in interface JavaWrapper
Parameters:
pointer - The native pointer to the source TupleDesc

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.

getColumnClass

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

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.

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.

getOid

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

size

public int size()
Returns the number of columns in this tuple descriptor.

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