org.postgresql.pljava.internal
Class SPI

java.lang.Object
  extended by org.postgresql.pljava.internal.SPI

public class SPI
extends java.lang.Object

The SPI class provides access to some global variables used by SPI.


Field Summary
static int ERROR_ARGUMENT
           
static int ERROR_CONNECT
           
static int ERROR_COPY
           
static int ERROR_CURSOR
           
static int ERROR_NOATTRIBUTE
           
static int ERROR_NOOUTFUNC
           
static int ERROR_OPUNKNOWN
           
static int ERROR_PARAM
           
static int ERROR_TRANSACTION
           
static int ERROR_TYPUNKNOWN
           
static int ERROR_UNCONNECTED
           
static int OK_CONNECT
           
static int OK_CURSOR
           
static int OK_DELETE
           
static int OK_FETCH
           
static int OK_FINISH
           
static int OK_INSERT
           
static int OK_SELECT
           
static int OK_SELINTO
           
static int OK_UPDATE
           
static int OK_UTILITY
           
 
Constructor Summary
SPI()
           
 
Method Summary
static int exec(java.lang.String command, int rowCount)
          Execute a command using the internal SPI_exec function.
static void freeTupTable()
           
static int getProcessed()
          Returns the value of the global variable SPI_processed.
static int getResult()
          Returns the value of the global variable SPI_result.
static java.lang.String getResultText(int resultCode)
          Returns a textual representatio of a result code
static TupleTable getTupTable(TupleDesc known)
          Returns the value of the global variable SPI_tuptable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_CONNECT

public static final int ERROR_CONNECT
See Also:
Constant Field Values

ERROR_COPY

public static final int ERROR_COPY
See Also:
Constant Field Values

ERROR_OPUNKNOWN

public static final int ERROR_OPUNKNOWN
See Also:
Constant Field Values

ERROR_UNCONNECTED

public static final int ERROR_UNCONNECTED
See Also:
Constant Field Values

ERROR_CURSOR

public static final int ERROR_CURSOR
See Also:
Constant Field Values

ERROR_ARGUMENT

public static final int ERROR_ARGUMENT
See Also:
Constant Field Values

ERROR_PARAM

public static final int ERROR_PARAM
See Also:
Constant Field Values

ERROR_TRANSACTION

public static final int ERROR_TRANSACTION
See Also:
Constant Field Values

ERROR_NOATTRIBUTE

public static final int ERROR_NOATTRIBUTE
See Also:
Constant Field Values

ERROR_NOOUTFUNC

public static final int ERROR_NOOUTFUNC
See Also:
Constant Field Values

ERROR_TYPUNKNOWN

public static final int ERROR_TYPUNKNOWN
See Also:
Constant Field Values

OK_CONNECT

public static final int OK_CONNECT
See Also:
Constant Field Values

OK_FINISH

public static final int OK_FINISH
See Also:
Constant Field Values

OK_FETCH

public static final int OK_FETCH
See Also:
Constant Field Values

OK_UTILITY

public static final int OK_UTILITY
See Also:
Constant Field Values

OK_SELECT

public static final int OK_SELECT
See Also:
Constant Field Values

OK_SELINTO

public static final int OK_SELINTO
See Also:
Constant Field Values

OK_INSERT

public static final int OK_INSERT
See Also:
Constant Field Values

OK_DELETE

public static final int OK_DELETE
See Also:
Constant Field Values

OK_UPDATE

public static final int OK_UPDATE
See Also:
Constant Field Values

OK_CURSOR

public static final int OK_CURSOR
See Also:
Constant Field Values
Constructor Detail

SPI

public SPI()
Method Detail

exec

public static int exec(java.lang.String command,
                       int rowCount)
Execute a command using the internal SPI_exec function.

Parameters:
command - The command to execute.
rowCount - The maximum number of tuples to create. A value of rowCount of zero is interpreted as no limit, i.e., run to completion.
Returns:
One of the declared status codes.

freeTupTable

public static void freeTupTable()

getProcessed

public static int getProcessed()
Returns the value of the global variable SPI_processed.


getResult

public static int getResult()
Returns the value of the global variable SPI_result.


getTupTable

public static TupleTable getTupTable(TupleDesc known)
Returns the value of the global variable SPI_tuptable.


getResultText

public static java.lang.String getResultText(int resultCode)
Returns a textual representatio of a result code



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