public class Procedure
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
COLUMN_TYPE
Field COLUMN_TYPE
|
protected PyObject |
columns
Field columns
|
protected PyCursor |
cursor
Field cursor
|
protected static int |
DATA_TYPE
Field DATA_TYPE
|
protected static int |
DATA_TYPE_NAME
Field DATA_TYPE_NAME
|
protected java.util.BitSet |
inputSet
Field inputSet
|
protected static int |
LENGTH
Field LENGTH
|
protected static int |
NAME
Field NAME
|
protected static int |
NULLABLE
Field NULLABLE
|
protected static int |
PRECISION
Field PRECISION
|
protected PyObject |
procedureCatalog
Field procedureCatalog
|
protected PyObject |
procedureName
Field procedureName
|
protected PyObject |
procedureSchema
Field procedureSchema
|
protected static int |
SCALE
Field SCALE
|
Constructor and Description |
---|
Procedure(PyCursor cursor,
PyObject name)
Constructor Procedure
|
Modifier and Type | Method and Description |
---|---|
protected void |
fetchColumns()
Get the columns for the stored procedure.
|
protected PyObject |
getDefault()
The value for a missing schema or catalog.
|
protected java.lang.String |
getProcedureName()
Construct a procedure name for the relevant schema and catalog information.
|
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.
|
java.sql.CallableStatement |
prepareCall()
Prepares the statement and registers the OUT/INOUT parameters (if any).
|
java.sql.CallableStatement |
prepareCall(PyObject rsType,
PyObject rsConcur)
Prepares the statement and registers the OUT/INOUT parameters (if any).
|
protected void |
registerOutParameters(java.sql.CallableStatement statement)
Registers the OUT/INOUT parameters of the statement.
|
java.lang.String |
toSql()
Returns the call in the syntax:
|
protected static final int NAME
protected static final int COLUMN_TYPE
protected static final int DATA_TYPE
protected static final int DATA_TYPE_NAME
protected static final int PRECISION
protected static final int LENGTH
protected static final int SCALE
protected static final int NULLABLE
protected PyCursor cursor
protected PyObject columns
protected PyObject procedureCatalog
protected PyObject procedureSchema
protected PyObject procedureName
protected java.util.BitSet inputSet
public java.sql.CallableStatement prepareCall() throws java.sql.SQLException
java.sql.SQLException
public java.sql.CallableStatement prepareCall(PyObject rsType, PyObject rsConcur) throws java.sql.SQLException
rsType
- the value of to be created ResultSet typersConcur
- the value of the to be created ResultSet concurrencyjava.sql.SQLException
public void normalizeInput(PyObject params, PyObject bindings) throws java.sql.SQLException
params
- a non-None list of paramsbindings
- a dictionary of bindingsjava.sql.SQLException
public boolean isInput(int index) throws java.sql.SQLException
index
- JDBC indexed column index (1, 2, ...)java.sql.SQLException
public java.lang.String toSql() throws java.sql.SQLException
{? = call <procedure-name>(?, ?, ...)} {call <procedure-name>(?, ?, ...)}As of now, all parameters variables are created and no support for named variable calling is supported.
java.sql.SQLException
protected void registerOutParameters(java.sql.CallableStatement statement) throws java.sql.SQLException
statement
- statementjava.sql.SQLException
protected void fetchColumns() throws java.sql.SQLException
java.sql.SQLException
protected PyObject getDefault()
DatabaseMetaData.getProcedureColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
protected java.lang.String getProcedureName()