Documentation of 'com.ziclix.python.sql.Procedure' Java class
Procedure
com.ziclix.python.sql

Class Procedure

  • Direct Known Subclasses:
    SQLServerProcedure


    public class Procedure
    extends java.lang.Object
    This class provides the necessary functionality to call stored procedures. It handles managing the database metadata and binding the appropriate parameters.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Procedure(PyCursor cursor, PyObject name)
      Constructor Procedure
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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).
      java.lang.String toSql()
      Returns the call in the syntax:
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Procedure

        public Procedure(PyCursor cursor,
                         PyObject name)
                  throws java.sql.SQLException
        Constructor Procedure
        Parameters:
        cursor - cursor an open cursor
        name - name a string or tuple representing the name
        Throws:
        java.sql.SQLException
    • Method Detail

      • prepareCall

        public java.sql.CallableStatement prepareCall()
                                               throws java.sql.SQLException
        Prepares the statement and registers the OUT/INOUT parameters (if any).
        Returns:
        CallableStatement
        Throws:
        java.sql.SQLException
      • prepareCall

        public java.sql.CallableStatement prepareCall(PyObject rsType,
                                                      PyObject rsConcur)
                                               throws java.sql.SQLException
        Prepares the statement and registers the OUT/INOUT parameters (if any).
        Parameters:
        rsType - the value of to be created ResultSet type
        rsConcur - the value of the to be created ResultSet concurrency
        Returns:
        CallableStatement
        Throws:
        java.sql.SQLException
      • normalizeInput

        public void normalizeInput(PyObject params,
                                   PyObject bindings)
                            throws java.sql.SQLException
        Prepare the binding dictionary with the correct datatypes.
        Parameters:
        params - a non-None list of params
        bindings - a dictionary of bindings
        Throws:
        java.sql.SQLException
      • isInput

        public boolean isInput(int index)
                        throws java.sql.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().
        Parameters:
        index - JDBC indexed column index (1, 2, ...)
        Returns:
        true if the column is an input, false otherwise
        Throws:
        java.sql.SQLException
      • toSql

        public java.lang.String toSql()
                               throws java.sql.SQLException
        Returns the call in the syntax:
         {? = call <procedure-name>(?, ?, ...)}
         {call <procedure-name>(?, ?, ...)}
         
        As of now, all parameters variables are created and no support for named variable calling is supported.
        Returns:
        String
        Throws:
        java.sql.SQLException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.