com.ziclix.python.sql
Class Procedure
Object
com.ziclix.python.sql.Procedure
public class Procedure
extends Object
This class provides the necessary functionality to call stored
procedures. It handles managing the database metadata and binding
the appropriate parameters.
- brian zimmer
- last modified by $Author: fwierzbicki $
boolean | isInput(int index) - This method determines whether the param at the specified index is an
IN or INOUT param for a stored procedure.
|
void | normalizeInput(PyObject params, PyObject bindings) - Prepare the binding dictionary with the correct datatypes.
|
CallableStatement | prepareCall() - Prepares the statement and registers the OUT/INOUT parameters (if any).
|
CallableStatement | prepareCall(PyObject rsType, PyObject rsConcur) - Prepares the statement and registers the OUT/INOUT parameters (if any).
|
String | toSql() - Returns the call in the syntax:
{?
|
Procedure
public Procedure(PyCursor cursor,
PyObject name)
throws SQLException
Constructor Procedure
cursor
- cursor an open cursorname
- name a string or tuple representing the name
isInput
public boolean isInput(int index)
throws SQLException
This method determines whether the param at the specified index is an
IN or INOUT param for a stored procedure. This is only configured properly
AFTER a call to normalizeInput().
index
- JDBC indexed column index (1, 2, ...)
- true if the column is an input, false otherwise
normalizeInput
public void normalizeInput(PyObject params,
PyObject bindings)
throws SQLException
Prepare the binding dictionary with the correct datatypes.
params
- a non-None list of paramsbindings
- a dictionary of bindings
prepareCall
public CallableStatement prepareCall()
throws SQLException
Prepares the statement and registers the OUT/INOUT parameters (if any).
prepareCall
public CallableStatement prepareCall(PyObject rsType,
PyObject rsConcur)
throws SQLException
Prepares the statement and registers the OUT/INOUT parameters (if any).
rsType
- the value of to be created ResultSet typersConcur
- the value of the to be created ResultSet concurrency
toSql
public String toSql()
throws SQLException
Returns the call in the syntax:
{? = call
(?, ?, ...)}
{call (?, ?, ...)}
As of now, all parameters variables are created and no support for named variable
calling is supported.
Jython homepage