| java.lang.Object com.ziclix.python.sql.Procedure
All known Subclasses: com.ziclix.python.sql.procedure.SQLServerProcedure,
Procedure | public class Procedure extends Object (Code) | | This class provides the necessary functionality to call stored
procedures. It handles managing the database metadata and binding
the appropriate parameters.
author: brian zimmer author: last modified by $Author: fwierzbicki $ version: $Revision: 2542 $ |
Method Summary | |
protected void | fetchColumns() Get the columns for the stored procedure. | protected PyObject | getDefault() The value for a missing schema or catalog. | protected String | getProcedureName() Construct a procedure name for the relevant schema and catalog information. | public boolean | isInput(int index) This method determines whether the param at the specified index is an
IN or INOUT param for a stored procedure. | public void | normalizeInput(PyObject params, PyObject bindings) Prepare the binding dictionary with the correct datatypes. | public CallableStatement | prepareCall() Prepares the statement and registers the OUT/INOUT parameters (if any). | public CallableStatement | prepareCall(PyObject rsType, PyObject rsConcur) Prepares the statement and registers the OUT/INOUT parameters (if any). | protected void | registerOutParameters(CallableStatement statement) Registers the OUT/INOUT parameters of the statement. | public String | toSql() 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. |
COLUMN_TYPE | final protected static int COLUMN_TYPE(Code) | | Field COLUMN_TYPE
|
DATA_TYPE | final protected static int DATA_TYPE(Code) | | Field DATA_TYPE
|
DATA_TYPE_NAME | final protected static int DATA_TYPE_NAME(Code) | | Field DATA_TYPE_NAME
|
LENGTH | final protected static int LENGTH(Code) | | Field LENGTH
|
NAME | final protected static int NAME(Code) | | Field NAME
|
NULLABLE | final protected static int NULLABLE(Code) | | Field NULLABLE
|
PRECISION | final protected static int PRECISION(Code) | | Field PRECISION
|
SCALE | final protected static int SCALE(Code) | | Field SCALE
|
procedureCatalog | protected PyObject procedureCatalog(Code) | | Field procedureCatalog
|
procedureName | protected PyObject procedureName(Code) | | Field procedureName
|
procedureSchema | protected PyObject procedureSchema(Code) | | Field procedureSchema
|
Procedure | public Procedure(PyCursor cursor, PyObject name) throws SQLException(Code) | | Constructor Procedure
Parameters: cursor - cursor an open cursor Parameters: name - name a string or tuple representing the name throws: SQLException - |
getDefault | protected PyObject getDefault()(Code) | | The value for a missing schema or catalog. This value is used to find
the column names for the procedure. Not all DBMS use the same default
value; for instance Oracle uses an empty string and SQLServer a null.
This implementation returns the empty string.
the default value (the empty string) See Also: java.sql.DatabaseMetaData.getProcedureColumns |
getProcedureName | protected String getProcedureName()(Code) | | Construct a procedure name for the relevant schema and catalog information.
|
isInput | public boolean isInput(int index) throws SQLException(Code) | | 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().
Parameters: index - JDBC indexed column index (1, 2, ...) true if the column is an input, false otherwise throws: SQLException - |
normalizeInput | public void normalizeInput(PyObject params, PyObject bindings) throws SQLException(Code) | | Prepare the binding dictionary with the correct datatypes.
Parameters: params - a non-None list of params Parameters: bindings - a dictionary of bindings |
prepareCall | public CallableStatement prepareCall(PyObject rsType, PyObject rsConcur) throws SQLException(Code) | | Prepares the statement and registers the OUT/INOUT parameters (if any).
Parameters: rsType - the value of to be created ResultSet type Parameters: rsConcur - the value of the to be created ResultSet concurrency CallableStatement throws: SQLException - |
toSql | public String toSql() throws SQLException(Code) | | 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.
String |
|
|