org.postgresql.pljava.internal
Class ExecutionPlan
java.lang.Objectorg.postgresql.pljava.internal.ExecutionPlan
public class ExecutionPlan
extends java.lang.Object
The ExecutionPlan correspons to the execution plan obtained
using an internal PostgreSQL SPI_prepare call.
void | close()- Close the plan.
|
Portal | cursorOpen(String cursorName, Object[] parameters)- Set up a cursor that will execute the plan using the internal
SPI_cursor_open function
|
int | execute(Object[] parameters, int rowCount)- Execute the plan using the internal
SPI_execp function.
|
boolean | isCursorPlan()- Checks if this
ExecutionPlan can create a Portal
using cursorOpen(String,Object[]).
|
static ExecutionPlan | prepare(String statement, Oid[] argTypes)- Create an execution plan for a statement to be executed later using the
internal
SPI_prepare function.
|
close
public void close()
Close the plan.
cursorOpen
public Portal cursorOpen(String cursorName,
Object[] parameters)
throws SQLException Set up a cursor that will execute the plan using the internal
SPI_cursor_open function
cursorName - Name of the cursor or null for a system
generated name.parameters - Values for the parameters.
- The
Portal that represents the opened cursor.
execute
public int execute(Object[] parameters,
int rowCount)
throws SQLException Execute the plan using the internal SPI_execp function.
parameters - Values for the parameters.rowCount - The maximum number of tuples to create. A value of
rowCount of zero is interpreted as no limit,
i.e., run to completion.
- One of the status codes declared in class
SPI.
isCursorPlan
public boolean isCursorPlan()
throws SQLException Checks if this
ExecutionPlan can create a
Portal
using
cursorOpen(String,Object[]). This is true if the plan contains only one
regular
SELECT query.
true if the plan can create a Portal
prepare
public static ExecutionPlan prepare(String statement,
Oid[] argTypes)
throws SQLException Create an execution plan for a statement to be executed later using the
internal SPI_prepare function.
statement - The command string.argTypes - SQL types of argument types.
- An execution plan for the prepared statement.
Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \
Distributed under the terms shown in COPYRIGHT