
    i                         d dl mZmZmZmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZmZ ddlmZ dd	lmZ dd
lmZ  G d de          Z G d de          Z G d de          ZdS )    )AnyUnionCallableOptional   )
connection)errors)utils)BaseMetaClass)DbTypeDB_TYPE_OBJECT)DbObjectType)	FetchInfo)Varc                      e Zd ZdZ	 dJdddeddfdZd Zd	 Zd
 Zd Z		 dKde
deeef         dededdf
dZ	 dKde
deeef         dede
ddf
dZdee
         dee
         fdZ	 dLde
de
deddfdZ	 dKdZdMdZdMdZedefd            Zej        deddfd            Z	 dNdeeeef         deeef         d edefd!Z defd"Z!edefd#            Z"dMd$Z#edeee$         df         fd%            Z%edefd&            Z&defd'Z'defd(Z(defd)Z)ede*fd*            Z+e+j        de*ddfd+            Z+ede
fd,            Z,ede*fd-            Z-e-j        de*ddfd.            Z-edefd/            Z.e.j        deddfd0            Z.	 dLde
de
deddfd1Z/edefd2            Z0ede*fd3            Z1e1j        de*ddfd4            Z1edefd5            Z2e2j        deddfd6            Z2d7ed8edeeef         fd9Z3dNd ed:eddfd;Z4edee
df         fd<            Z5	 	 	 	 	 	 	 	 dOdd>deeeef         d ed?ed@e*dAe*dBe
dCe
dDedEedFe
ddGfdHZ6edee7j8        df         fdI            Z9dS )P
BaseCursorNFr   connection_module.Connection
scrollablereturnc                 R    || _         |j                            |          | _        d S N)_connection_implcreate_cursor_impl)selfr   r   s      _/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/oracledb/cursor.py__init__zBaseCursor.__init__/   s(    
 &%88DD


    c                 N    | j         | j                             d           d S d S )NTin_del)r   closer   s    r   __del__zBaseCursor.__del__7   s1    :!JD))))) "!r   c                 .    |                                   | S zY
        The entry point for the cursor as a context manager. It returns itself.
        _verify_openr#   s    r   	__enter__zBaseCursor.__enter__;   s     	r   c                 r    |                                   | j                            d           d| _        dS zc
        The exit point for the cursor as a context manager. It closes the
        cursor.
        Tr    Nr(   r   r"   )r   exc_type	exc_valueexc_tbs       r   __exit__zBaseCursor.__exit__B   s:    
 	
%%%


r   c                 6    | j         j        }d| d| j        dS )N<z on >)	__class___public_namer   )r   cls_names     r   __repr__zBaseCursor.__repr__K   s'    >.58555555r   name
parameterskeyword_parametersreturn_valuec                     t          j        ||           |                                  |                     ||||          \  }}|                     ||          S )zn
        Internal method used for generating the PL/SQL block used to call
        stored procedures.
        )r
   verify_stored_proc_argsr(   _call_get_execute_argsexecute)r   r8   r9   r:   r;   	statementbind_valuess          r   _callzBaseCursor._callO   sd     	%j2DEEE!%!<!<*0,"
 "
	; ||I{333r   c                 t   g }g }dg}|*|                     d           |                     |           |                     |dz              |r;|                    |           d t          t          |                    D             }|rY|                                D ]D\  }}	|                     |	           |                     | dt          |          dz               E|                     d                    |                     |                     d	           d
                    |          }
|
|fS )z
        Internal method used for generating the PL/SQL block used to call
        stored procedures and functions. A tuple containing this statement and
        the bind values is returned.
        zbegin Nz:retval := (c                     g | ]
}d |dz   z  S )z:%dr    .0is     r   
<listcomp>z5BaseCursor._call_get_execute_args.<locals>.<listcomp>v   s     JJJa%1q5/JJJr   z => :r   ,z); end; )appendextendrangelenitemsjoin)r   r8   r9   r:   r;   
bind_namesrA   statement_partsarg_name	arg_valuer@   s              r   r>   z!BaseCursor._call_get_execute_argsa   sX    
#*#""=111|,,,tcz*** 	Kz***JJ5Z3I3IJJJJ 	K'9'?'?'A'A K K#)""9---!!X"I"IC
OOa4G"I"IJJJJsxx
33444y)))GGO,,	;''r   r@   c                 r    |4|                                 }|st          j        t          j                   |S )z
        Normalizes a statement by stripping leading and trailing spaces. If the
        result is an empty string, an error is raised immediately.
        )stripr	   
_raise_errERR_EMPTY_STATEMENTr   r@   s     r   _normalize_statementzBaseCursor._normalize_statement   s;    
  !))I >!&"<===r   Ttagcache_statementc                 >    | j                             |||           dS )zO
        Internal method used for preparing a statement for execution.
        N)r   preparer   r@   r]   r^   s       r   _preparezBaseCursor._prepare   s$     	
9c?;;;;;r   c                     |                                   | j                            | |                     |          ||           dS )zJ
        Internal method for preparing a statement for execution.
        N)r(   r   _prepare_for_executer\   )r   r@   r9   r:   s       r   rd   zBaseCursor._prepare_for_execute   sT     	
''%%i00		
 	
 	
 	
 	
r   c                     |                                   | j                            |           s t          j        t          j                   dS dS )zF
        Verifies that fetching is possible from this cursor.
        N)r(   r   is_queryr	   rY   ERR_NOT_A_QUERYr#   s    r   _verify_fetchzBaseCursor._verify_fetch   sR     	z""4(( 	6f455555	6 	6r   c                     | j         t          j        t          j                   | j                                         dS )z
        Verifies that the cursor is open and the associated connection is
        connected. If either condition is false an exception is raised.
        N)r   r	   rY   ERR_CURSOR_NOT_OPENr   _verify_connectedr#   s    r   r(   zBaseCursor._verify_open   s:    
 :f8999))+++++r   c                 B    |                                   | j        j        S )a  
        This read-write attribute can be used to tune the number of rows
        internally fetched and buffered by internal calls to the database when
        fetching rows from SELECT statements and REF CURSORS.

        The value of ``arraysize`` can drastically affect the performance of a
        query since it directly affects the number of network round trips
        between Python and the database.  For methods like :meth:`fetchone()`
        and :meth:`fetchall()` it affects internal behavior but does not change
        how many rows are returned to the application. For :meth:`fetchmany()`
        it is the default number of rows to fetch.

        The attribute is only used for tuning row and SODA document fetches
        from the database.  It does not affect data inserts.

        Due to the performance benefits, the default ``arraysize`` is *100*
        instead of the *1* that the Python DB API recommends.
        )r(   r   	arraysizer#   s    r   rm   zBaseCursor.arraysize   s!    ( 	z##r   valuec                     |                                   t          |t                    r|dk    rt          j        t          j                   || j        _        d S )Nr   )r(   
isinstanceintr	   rY   ERR_INVALID_ARRAYSIZEr   rm   r   rn   s     r   rm   zBaseCursor.arraysize   sR    %%% 	<!f:;;;$
r   r   typsizec                 d   |                                   t          |t                    rt          |          }n't          |t                    r|}nt          d          | j                            | j        |||d          }t          |t                    r|	                    d|           |S )a  
        Creates an array variable associated with the cursor of the given type
        and size and returns a :ref:`variable object <varobj>`. The value is
        either an integer specifying the number of elements to allocate or it
        is a list and the number of elements allocated is drawn from the size
        of the list. If the value is a list, the variable is also set with the
        contents of the list. If the size is not specified and the type is a
        string or binary, 4000 bytes is allocated. This is needed for passing
        arrays to PL/SQL (in cases where the list might be empty and the type
        cannot be determined automatically) or returning arrays from PL/SQL.
        z#expecting integer or list of valuesT)ru   num_elementsis_arrayr   )
r(   rp   listrP   rq   	TypeErrorr   
create_varr   setvalue)r   rt   rn   ru   rw   vars         r   arrayvarzBaseCursor.arrayvar   s    " 	eT"" 	Cu::LLs## 	C LLABBBj##O% $ 
 
 eT"" 	#LLE"""
r   c                     |                                   | j        j        t          j        t          j                   | j                                        S )z
        Returns the list of bind variable names bound to the statement. Note
        that a statement must have been prepared first.
        )r(   r   r@   r	   rY   ERR_NO_STATEMENT_PREPAREDget_bind_namesr#   s    r   	bindnameszBaseCursor.bindnames   sI    
 	:'f>???z((***r   c                 \    |                                   | j                                        S )a  
        This read-only attribute provides the bind variables used for the last
        statement that was executed on the cursor. The value will be either a
        list or a dictionary, depending on whether binding was done by position
        or name. Care should be taken when referencing this attribute. In
        particular, elements should not be removed or replaced.
        )r(   r   get_bind_varsr#   s    r   bindvarszBaseCursor.bindvars   s*     	z'')))r   c                 n    |                                   | j                                         d| _        dS )z
        Closes the cursor now, rather than whenever ``__del__`` is called. The
        cursor will be unusable from this point forward; an Error exception
        will be raised if any operation is attempted with the cursor.
        Nr,   r#   s    r   r"   zBaseCursor.close	  s5     	



r   c                     |                                   | j                            |           rd | j        j        D             S dS )a>  
        This read-only attribute contains information about the columns used in
        a query. It is a list of FetchInfo objects, one per column. This
        attribute will be *None* for statements that are not SELECT or WITH
        statements, or if the cursor has not had :meth:`execute()` invoked yet.
        c                 6    g | ]}t          j        |          S rF   )r   
_from_implrG   s     r   rJ   z*BaseCursor.description.<locals>.<listcomp>  s#    OOOI(++OOOr   N)r(   r   rf   fetch_metadatar#   s    r   descriptionzBaseCursor.description  sT     	:t$$ 	POOTZ5NOOOO	P 	Pr   c                 \    |                                   | j                                        S )a  
        This read-only attribute specifies the list of variables created for
        the last SELECT query that was executed on the cursor.  Care should be
        taken when referencing this attribute. In particular, elements should
        not be removed or replaced.
        )r(   r   get_fetch_varsr#   s    r   	fetchvarszBaseCursor.fetchvars  s*     	z((***r   c                 \    |                                   | j                                        S )a  
        Retrieves the DML row counts after a call to :meth:`executemany()` with
        ``arraydmlrowcounts`` enabled. This will return a list of integers
        corresponding to the number of rows affected by the DML statement for
        each element of the array passed to :meth:`executemany()`.

        This method is only available for Oracle Database 12.1 and later.
        )r(   r   get_array_dml_row_countsr#   s    r   getarraydmlrowcountszBaseCursor.getarraydmlrowcounts*  s*     	z22444r   c                 \    |                                   | j                                        S )aG  
        Retrieves the exceptions that took place after a call to
        :meth:`executemany()` with ``batcherrors`` enabled. This will
        return a list of Error objects, one error for each iteration that
        failed. The offset can be determined by looking at the offset attribute
        of the error object.
        )r(   r   get_batch_errorsr#   s    r   getbatcherrorszBaseCursor.getbatcherrors6  s*     	z**,,,r   c                 h    |                                   | j                            | j                  S )a  
        Returns a list of cursors which correspond to implicit results made
        available from a PL/SQL block or procedure without the use of OUT ref
        cursor parameters. The PL/SQL block or procedure opens the cursors and
        marks them for return to the client using the procedure
        dbms_sql.return_result. In python-oracledb Thick mode, closing the
        parent cursor will result in the automatic closure of the implicit
        result set cursors. See :ref:`implicitresults`.

        This method is only available for Oracle Database 12.1 (or later). For
        python-oracledb :ref:`Thick <enablingthick>` mode, Oracle Client 12.1
        (or later) is additionally required.
        )r(   r   get_implicit_resultsr   r#   s    r   getimplicitresultszBaseCursor.getimplicitresultsA  s.     	z..t???r   c                 B    |                                   | j        j        S )a/  
        This read-write attribute specifies a method called for each value that
        is bound to a statement executed on the cursor and overrides the
        attribute with the same name on the connection if specified. The method
        signature is handler(cursor, value, arraysize) and the return value is
        expected to be a variable object or *None* in which case a default
        variable object will be created. If this attribute is *None*, the
        default behavior will take place for all values bound to the
        statements.
        r(   r   inputtypehandlerr#   s    r   r   zBaseCursor.inputtypehandlerR  s!     	z**r   c                 F    |                                   || j        _        d S r   r   rs   s     r   r   zBaseCursor.inputtypehandlera  s$    &+
###r   c                 \    |                                   | j                                        S )z
        This read-only attribute returns the rowid of the last row modified by
        the cursor. If no row was modified by the last operation performed on
        the cursor, the value *None* is returned.
        )r(   r   get_lastrowidr#   s    r   	lastrowidzBaseCursor.lastrowidf  s*     	z'')))r   c                 B    |                                   | j        j        S )a  
        This read-write attribute specifies a method called for each column
        that is to be fetched from this cursor. The method signature is
        handler(cursor, metadata) and the return value is expected to be a
        :ref:`variable object <varobj>` or *None* in which case a default
        variable object will be created. If this attribute is *None*, then the
        default behavior will take place for all columns fetched from this
        cursor.
        r(   r   outputtypehandlerr#   s    r   r   zBaseCursor.outputtypehandlerp  s!     	z++r   c                 F    |                                   || j        _        d S r   r   rs   s     r   r   zBaseCursor.outputtypehandler~  s$    ',
$$$r   c                 B    |                                   | j        j        S )a+  
        This read-write attribute can be used to tune the number of rows that
        python-oracledb initially fetches from Oracle Database when a SELECT
        query is executed. The value can improve performance by reducing the
        number of round-trips to the database. The attribute does not affect
        data insertion.

        In python-oracledb Thin mode, prefetching can reuse the
        :attr:`arraysize` buffer. However in Thick mode, extra memory is
        required.

        Setting this value to *0* can be useful when the timing of fetches must
        be explicitly controlled.

        Queries that return :ref:`LOB <lobobj>` objects and similar types do
        not support prefetching. The ``prefetchrows`` attribute is ignored in
        queries that involve these types.
        r(   r   prefetchrowsr#   s    r   r   zBaseCursor.prefetchrows  s!    ( 	z&&r   c                 F    |                                   || j        _        d S r   r   rs   s     r   r   zBaseCursor.prefetchrows  s$    "'
r   c                 \    |                                   |                     |||           dS )a  
        This can be used before a call to :meth:`execute()` or
        :meth:`executemany()` to define the statement that will be
        executed. When this is done, the prepare phase will not be performed
        when the call to :meth:`execute()` or :meth:`executemany()` is made
        with *None* or the same string object as the statement.

        If the ``tag`` parameter is specified and the ``cache_statement``
        parameter is *True*, the statement will be returned to the statement
        cache with the given tag.

        If the ``cache_statement`` parameter is *False*, the statement will be
        removed from the statement cache (if it was found there) or will simply
        not be cached.
        N)r(   rb   ra   s       r   r`   zBaseCursor.prepare  s2    $ 	io66666r   c                 D    | j         | j        j         | j         j        S dS )a  
        This read-only attribute specifies the number of rows that have
        currently been fetched from the cursor (for select statements) or that
        have been affected by the operation (for insert, update, delete, and
        merge statements). For all other statements the value is always *0*. If
        the cursor or connection is closed, the value returned is *-1*.
        N)r   r   rowcountr#   s    r   r   zBaseCursor.rowcount  s&     :!do&;&G:&&rr   c                 B    |                                   | j        j        S )a  
        This read-write attribute specifies a method to call for each row that
        is retrieved from the database. Ordinarily, a tuple is returned for
        each row but if this attribute is set, the method is called with the
        tuple that would normally be returned, and the result of the method is
        returned instead.

        The ``rowfactory`` attribute should be set after each statement
        execution before data is fetched from the cursor.
        r(   r   
rowfactoryr#   s    r   r   zBaseCursor.rowfactory  s!     	z$$r   c                 F    |                                   || j        _        d S r   r   rs   s     r   r   zBaseCursor.rowfactory  $     %
r   c                 B    |                                   | j        j        S )aq  
        This read-write boolean attribute specifies whether the cursor can be
        scrolled or not. By default, cursors are not scrollable, as the server
        resources and response times are greater than nonscrollable cursors.
        This attribute is checked and the corresponding mode set in Oracle when
        calling the method :meth:`execute()`.
        r(   r   r   r#   s    r   r   zBaseCursor.scrollable  s!     	z$$r   c                 F    |                                   || j        _        d S r   r   rs   s     r   r   zBaseCursor.scrollable  r   r   argskwargsc                     |r!|rt          j        t           j                   n9|s|r5|                                  | j                            | j        ||          S g S )aM  
        This can be used before calls to :meth:`execute()` or
        :meth:`executemany()` to predefine memory areas used for
        :ref:`bind variables <bind>`. Each parameter should be a type object
        corresponding to the data that will be used for a bind variable
        placeholder in the SQL or PL/SQL statement. Alternatively, it can be an
        integer specifying the maximum length of a string bind variable value.

        Use keyword parameters when :ref:`binding by name <bindbyname>`. Use
        positional parameters when :ref:`binding by position <bindbyposition>`.
        The parameter value can be *None* to indicate that python-oracledb
        should determine the required space from the data value provided.

        The parameters or keyword names correspond to the bind variable
        placeholders used in the SQL or PL/SQL statement. Note this means that
        for use with :meth:`executemany()` it does not correspond to the number
        of bind value mappings or sequences being passed.

        When repeated calls to :meth:`execute()` or :meth:`executemany()` are
        made binding different string data lengths, using
        :meth:`setinputsizes()` can help reduce the database's SQL "version
        count" for the statement. See
        :ref:`Reducing the SQL Version Count <sqlversioncount>`.
        )r	   rY   ERR_ARGS_AND_KEYWORD_ARGSr(   r   setinputsizesr   )r   r   r   s      r   r   zBaseCursor.setinputsizes  sp    2  	KF 	Kf>???? 	KV 	K:++DOT6JJJ	r   columnc                     dS )a  
        This method does nothing and is retained solely for compatibility with
        the DB API. Python-oracledb automatically allocates as much space as
        needed to fetch LONG and LONG RAW columns, and also to fetch CLOB as
        string and BLOB as bytes.
        NrF   )r   ru   r   s      r   setoutputsizezBaseCursor.setoutputsize  s	     	r   c                 ,    | j         | j         j        S dS )z
        This read-only attribute provides the string object that was previously
        prepared with :meth:`prepare()` or executed with :meth:`execute()`.
        N)r   r@   r#   s    r   r@   zBaseCursor.statement  s     :!:'' "!r   r   )encodingErrorsrm   inconverteroutconvertertypenameencoding_errorsbypass_decodeconvert_nullsr   r   c
                P   |                                   || j                            |          }n'|t          u rt	          j        t          j                   |
%|!t	          j        t          j        dd           |
}| j        	                    | j        ||||||||		  	        S )a6  
        Creates a :ref:`variable object <varobj>` with the specified
        characteristics. This method can be used for binding to PL/SQL IN and
        OUT parameters where the length or type cannot be determined
        automatically from the Python variable being bound. It can also be used
        in :ref:`input <inputtypehandlers>` and :ref:`output
        <outputtypehandlers>` type handlers.

        The ``typ`` parameter specifies the type of data that should be stored
        in the variable. This should be one of the :ref:`database type
        constants <dbtypes>`, :ref:`DB API constants <types>`, an object type
        returned from the method :meth:`Connection.gettype()` or one of the
        following Python types:

        - bool (uses :attr:`oracledb.DB_TYPE_BOOLEAN`)
        - bytes (uses :attr:`oracledb.DB_TYPE_RAW`)
        - datetime.date (uses :attr:`oracledb.DB_TYPE_DATE`)
        - datetime.datetime (uses :attr:`oracledb.DB_TYPE_DATE`)
        - datetime.timedelta (uses :attr:`oracledb.DB_TYPE_INTERVAL_DS`)
        - decimal.Decimal (uses :attr:`oracledb.DB_TYPE_NUMBER`)
        - float (uses :attr:`oracledb.DB_TYPE_NUMBER`)
        - int (uses :attr:`oracledb.DB_TYPE_NUMBER`)
        - str (uses :attr:`oracledb.DB_TYPE_VARCHAR`)

        The ``size`` parameter specifies the length of string and raw variables
        and is ignored in all other cases. If not specified for string and raw
        variables, the value *4000* is used.

        The ``arraysize`` parameter specifies the number of elements the
        variable will have. If not specified the bind array size (usually *1*)
        is used. When a variable is created in an output type handler this
        parameter should be set to the cursor's array size.

        The ``inconverter`` and ``outconverter`` parameters specify methods
        used for converting values to/from the database. More information can
        be found in the section on :ref:`variable objects<varobj>`.

        The ``typename`` parameter specifies the name of a SQL object type and
        must be specified when using type :data:`oracledb.OBJECT` unless the
        type object was passed directly as the first parameter.

        The ``encoding_errors`` parameter specifies what should happen when
        decoding byte strings fetched from the database into strings. It should
        be one of the values noted in the builtin `decode
        <https://docs.python.org/3/library/stdtypes.html#bytes.decode>`__
        function.

        The ``bypass_decode`` parameter, if specified, should be passed as a
        boolean value. Passing a *True* value causes values of database types
        :data:`~oracledb.DB_TYPE_VARCHAR`, :data:`~oracledb.DB_TYPE_CHAR`,
        :data:`~oracledb.DB_TYPE_NVARCHAR`, :data:`~oracledb.DB_TYPE_NCHAR` and
        :data:`~oracledb.DB_TYPE_LONG` to be returned as bytes instead of str,
        meaning that python-oracledb does not do any decoding. See
        :ref:`Fetching raw data <fetching-raw-data>` for more information.

        The ``convert_nulls`` parameter, if specified, should be passed as a
        boolean value. Passing the value *True* causes the ``outconverter`` to
        be called when a null value is fetched from the database; otherwise,
        the ``outconverter`` is only called when non-null values are fetched
        from the database.

        For consistency and compliance with the PEP 8 naming style, the
        parameter ``encodingErrors`` was renamed to ``encoding_errors``. The
        old name will continue to work as a keyword parameter for a period of
        time.
        Nr   r   deprecated_namenew_name)r   )
r(   r   gettyper   r	   rY   $ERR_MISSING_TYPE_NAME_FOR_OBJECT_VARERR_DUPLICATED_PARAMETERr   r{   )r   rt   ru   rm   r   r   r   r   r   r   r   s              r   r}   zBaseCursor.var  s    ` 	/))(33CCN""fIJJJ%*!3$4.   
 -Oz$$O' % 

 

 
	
r   c                 B    |                                   | j        j        S )a  
        This read-only attribute provides an
        :ref:`oracledb._Error<exchandling>` object giving information about any
        database warnings (such as PL/SQL compilation warnings) that were
        generated during the last call to :meth:`execute()` or
        :meth:`executemany()`. This value is automatically cleared on
        the next call to :meth:`execute()` or :meth:`executemany()`. If no
        warning was generated the value *None* is returned.
        )r(   r   warningr#   s    r   r   zBaseCursor.warning  s!     	z!!r   )Fr   )NT)r   Nr   )r   r   NNNNFF):__name__
__module____qualname__r   boolr   r$   r)   r0   r7   strr   ry   tupledictr   rB   r>   r   r\   rb   rd   rh   r(   propertyrq   rm   setterr   r   typer   r~   r   r   r"   r   r   r   r   r   r   r   r   r   r   r   r`   r   r   r   r   r   r@   r}   r	   _Errorr   rF   r   r   r   r   ,   s       E
 !E E2E E 
	E E E E* * *    6 6 6 !4 44 $+&4 !	4
 4 
4 4 4 4. !( (( $+&( !	(
 ( 
( ( ( (>	hsm 	 	 	 	 	 HL< <<#&<@D<	< < < < 9=
 
 
 
6 6 6 6, , , , $3 $ $ $ X$, %s %t % % % % 	! !6<-.! T3Y! 	!
 
! ! ! !F+4 + + + + 	*$ 	* 	* 	* X	*    	PU4	?D#89 	P 	P 	P X	P +4 + + + X+
5d 
5 
5 
5 
5	- 	- 	- 	- 	-@D @ @ @ @" +( + + + X+ ,h ,4 , , , , *3 * * * X* ,8 , , , X, -x -D - - - - 'c ' ' ' X', (# ($ ( ( ( (
 HL7 77#&7@D7	7 7 7 7* 
# 
 
 
 X
 %H % % % X% & &T & & & & 	%D 	% 	% 	% X	% & & & & & &3 # %d
:K    @ # s 4     (5d+ ( ( ( X(  $!%###g
 #g
 g
 g
6<-.g
 g
 	g

 g
 g
 g
 g
 g
 g
 g
 
g
 g
 g
 g
R "v}d23 " " " X" " "r   r   )	metaclassc                   8   e Zd Zd Zd ZdededefdZdedededdfd	Z	 	 d+dd
de	dede
eeef                  de
e         de
e         defdZ	 	 d+dd
de	de
eeef                  de
e         de
e         def
dZed,d            Z	 d-ddddde
e	         de
eeeef                  dede
e         de
e         dedefdZdddddde
e	         dedededededdfd Zdefd!Z	 d+d"e
e         d#e
e         defd$Zdefd%Zde	ddfd&Zd.ded)e	ddfd*ZdS )/Cursorc                     | S )zF
        Returns the cursor itself to be used as an iterator.
        rF   r#   s    r   __iter__zCursor.__iter__  	     r   c                 t    |                                   | j                            |           }||S t          r   )rh   r   fetch_next_rowStopIterationr   rows     r   __next__zCursor.__next__  s9    j''--?Jr   attr_num	attr_typer   c                 `    |                                   | j                            ||          S )z
        Returns the value of the specified OCI attribute from the internal
        handle. This is only supported in python-oracledb's thick mode and
        should only be used as directed by Oracle.
        )r(   r   _get_oci_attr)r   r   r   s      r   r   zCursor._get_oci_attr  s.     	z'')<<<r   rn   Nc                 f    |                                   | j                            |||           dS )z
        Sets the value of the specified OCI attribute on the internal handle.
        This is only supported in python-oracledb's thick mode and should only
        be used as directed by Oracle.
        N)r(   r   _set_oci_attr)r   r   r   rn   s       r   r   zCursor._set_oci_attr  s6     	
  9e<<<<<r   )keywordParametersr8   return_typer9   r:   r   c                    |                      |          }|%|!t          j        t          j        dd           |}|                     ||||           |                                S )a  
        Calls a PL/SQL function with the given name and returns its value.

        The ``return_type`` parameter is expected to be a Python type, one of
        the :ref:`oracledb types <types>` or an
        :ref:`Object Type <dbobjecttype>`.

        The sequence of parameters must contain one entry for each parameter
        that the PL/SQL function expects. Any keyword parameters will be
        included after the positional parameters.

        Use :meth:`var()` to define any OUT or IN OUT parameters, if necessary.

        For consistency and compliance with the PEP 8 naming style, the
        parameter ``keywordParameters`` was renamed to ``keyword_parameters``.
        The old name will continue to work for a period of time.
        Nr   r:   r   )r}   r	   rY   r   rB   getvalue)r   r8   r   r9   r:   r   r}   s          r   callfunczCursor.callfunc  sv    4 hh{##(!-!3$71   
 "3

4%7===||~~r   c                    |%|!t          j        t           j        dd           |}|                     |||           |g S d | j        j        dt          |                   D             S )a  
        Calls a PL/SQL procedure with the given name.

        The sequence of parameters must contain one entry for each parameter
        that the procedure expects. The result of the call is a modified copy
        of the input sequence. Input parameters are left untouched; output and
        input/output parameters are replaced with possibly new values. Keyword
        parameters will be included after the positional parameters and are not
        returned as part of the output sequence.

        Use :meth:`var()` to define any OUT or IN OUT parameters if necessary.

        No query result set is returned by this method. Instead, use
        :ref:`REF CURSOR <refcur>` parameters or
        :ref:`Implicit Results <implicitresults>`.

        For consistency and compliance with the PEP 8 naming style, the
        parameter ``keywordParameters`` was renamed to ``keyword_parameters``.
        The old name will continue to work for a period of time.
        Nr   r:   r   c                 8    g | ]}|                     d           S r   	get_valuerH   vs     r   rJ   z#Cursor.callproc.<locals>.<listcomp>  /     
 
 
 AKKNN
 
 
r   )r	   rY   r   rB   r   	bind_varsrP   )r   r8   r9   r:   r   s        r   callproczCursor.callproc  s    8 (!-!3$71   
 "3

4%7888I
 
$(J$89J3z??9J$K
 
 
 	
r   r   c                     | j         S z
        This read-only attribute returns a reference to the connection object
        on which the cursor was created.
        r   r#   s    r   r   zCursor.connection       r   Fsuspend_on_success
fetch_lobsfetch_decimalsr@   r   r   r   c                    |                      |||           | j        }|||_        |||_        ||_        |                    |            |j        | S dS )a
  
        Executes a statement against the database. See :ref:`sqlexecution`.

        Parameters may be passed as a dictionary or sequence or as keyword
        parameters. If the parameters are a dictionary, the values will be
        bound by name and if the parameters are a sequence the values will be
        bound by position. Note that if the values are bound by position, the
        order of the variables is from left to right as they are encountered in
        the statement and SQL statements are processed differently than PL/SQL
        statements. For this reason, it is generally recommended to bind
        parameters by name instead of by position.

        Parameters passed as a dictionary are name and value pairs. The name
        maps to the bind variable name used by the statement and the value maps
        to the Python value you wish bound to that bind variable.

        A reference to the statement will be retained by the cursor. If *None*
        or the same string object is passed in again, the cursor will execute
        that statement again without performing a prepare or rebinding and
        redefining.  This is most effective for algorithms where the same
        statement is used, but different parameters are bound to it (many
        times). Note that parameters that are not passed in during subsequent
        executions will retain the value passed in during the last execution
        that contained them.

        The ``suspend_on_success`` parameter is specific to :ref:`sessionless
        transactions <sessionlesstxns>`. When set to *True*, the active
        sessionless transaction will be suspended when ``execute()`` completes
        successfully.  See :ref:`suspendtxns`.

        The ``fetch_lobs`` parameter specifies whether to return LOB locators
        or ``str``/``bytes`` values when fetching LOB columns. The default
        value is :data:`oracledb.defaults.fetch_lobs <Defaults.fetch_lobs>`.

        The ``fetch_decimals`` parameter specifies whether to return
        ``decimal.Decimal`` values when fetching columns of type ``NUMBER``.
        The default value is :data:`oracledb.defaults.fetch_decimals
        <Defaults.fetch_decimals>`.

        For maximum efficiency when reusing a statement, it is best to use the
        :meth:`Cursor.setinputsizes()` method to specify the parameter types
        and sizes ahead of time; in particular, *None* is assumed to be a
        string of length 1 so any values that are later bound as numbers or
        dates will raise a TypeError exception.

        If the statement is a SELECT query, the cursor is returned as a
        convenience to the caller (so it can be used directly as an iterator
        over the rows in the cursor); otherwise, *None* is returned.
        N)rd   r   r   r   r   r?   
fetch_varsr   r@   r9   r   r   r   r:   impls           r   r?   zCursor.execute
  so    v 	!!)Z9KLLLz!(DO%"0D"4T?&K '&r       batcherrorsarraydmlrowcountsr   
batch_sizer  r  r  c                N   |                                   | j                            | |                     |          ||          }|| j        _        |j        dk    rI| j                            | |j        |||j                   |                                 |j        dk    GdS dS )a  
        Executes a SQL statement once using all bind value mappings or
        sequences found in the sequence parameters. This can be used to insert,
        update, or delete multiple rows in a table with a single
        python-oracledb call. It can also invoke a PL/SQL procedure multiple
        times. See :ref:`batchstmnt`.

        The ``statement`` parameter is managed in the same way as the
        :meth:`execute()` method manages it.

        The ``parameters`` parameter can be a list of tuples, where each tuple
        item maps to one bind variable placeholder in ``statement``. It can
        also be a list of dictionaries, where the keys match the bind variable
        placeholder names in ``statement``. If there are no bind values, or
        values have previously been bound, the ``parameters`` value can be an
        integer specifying the number of iterations. The ``parameters``
        parameter can also be a :ref:`DataFrame <oracledataframeobj>`, or a
        third-party data frame that supports the `Apache Arrow PyCapsule
        <https://arrow.apache.org/docs/
        format/CDataInterface/PyCapsuleInterface.html>`__ Interface.

        In python-oracledb Thick mode, if the size of the buffers allocated for
        any of the parameters exceeds 2 GB, you will receive the error
        ``DPI-1015: array size of <n> is too large``. If you receive this
        error, decrease the number of rows being inserted.

        When *True*, the ``batcherrors`` parameter enables batch error support
        within Oracle Database and ensures that the call succeeds even if an
        exception takes place in one or more of the sequence of bind values.
        The errors can then be retrieved using :meth:`getbatcherrors()`.

        When *True*, the ``arraydmlrowcounts`` parameter enables DML row counts
        to be retrieved from Oracle after the method has completed. The row
        counts can then be retrieved using
        :meth:`getarraydmlrowcounts()`.

        Both the ``batcherrors`` parameter and the ``arraydmlrowcounts``
        parameter can only be *True* when executing an insert, update, delete,
        or merge statement; in all other cases an error will be raised.

        The ``suspend_on_success`` parameter is specific to :ref:`sessionless
        transactions <sessionlesstxns>`. When set to *True*, the active
        sessionless transaction will be suspended when ``executemany()``
        completes successfully. See :ref:`suspendtxns`.

        The ``batch_size`` parameter is used to split large data sets into
        smaller pieces for sending to the database. It is the number of records
        in each batch. This parameter can be used to tune performance. When
        ``Connection.autocommit`` is *True*, a commit will take place for each
        batch.

        For maximum efficiency, it is best to use the :meth:`setinputsizes()`
        method to specify the bind value types and sizes. In particular, if the
        type is not explicitly specified, the value *None* is assumed to be a
        string of length 1 so any values that are later bound as numbers or
        dates will raise a TypeError exception.
        r   N	r(   r   _prepare_for_executemanyr\   r   num_rowsexecutemanymessage_offset
next_batchr   r@   r9   r  r  r   r  managers           r   r  zCursor.executemanyP  s    F 	*55%%i00	
 
 );
%""J"" !&       """"""r   c                     |                                   g }| j        j        }	  ||           }|n|                    |           $|S )a  
        Fetches all (remaining) rows of a SELECT query result, returning them
        as a list of tuples. An empty list is returned if no more rows are
        available. An exception is raised if the previous call to
        :meth:`execute()` did not produce any result set or no call was issued
        yet.

        Note that the cursor's :attr:`~Cursor.arraysize` attribute can affect
        the performance of this operation, as internally data is fetched in
        batches of that size from the database. See :ref:`Tuning Fetch
        Performance <tuningfetch>`.

        An exception is raised if the previous call to :meth:`execute()` did
        not produce any result set or no call was issued yet.
        rh   r   r   rM   r   resultr   r   s       r   fetchallzCursor.fetchall  s_      	2	 .&&C{MM#		
 r   ru   numRowsc                 J   |                                   |||}n0| j        j        }n#|!t          j        t          j        dd           g }| j        j        }t          |          |k     r6 ||           }|n(|                    |           t          |          |k     6|S )a  
        Fetches the next set of rows of a SELECT query result, returning a list
        of tuples.  An empty list is returned if no more rows are available.
        Note that the cursor's :attr:`arraysize` attribute can affect the
        performance of this operation.

        The number of rows to fetch is specified by the ``size`` parameter. If
        it is not given, the cursor's :attr:`arraysize` attribute determines
        the number of rows to be fetched. If the number of rows available to be
        fetched is fewer than the amount requested, fewer rows will be
        returned.

        An exception is raised if the previous call to :meth:`execute()` did
        not produce any result set or no call was issued yet.
        Nr  ru   r   )	rh   r   rm   r	   rY   r   r   rP   rM   )r   ru   r  r  r   r   s         r   	fetchmanyzCursor.fetchmany  s    $ 	<"z+ / )   
 2&kkD   .&&C{MM#	 &kkD  
 r   c                 ^    |                                   | j                            |           S )  
        Fetches the next row of a SELECT query result set, returning a single
        tuple or *None* when no more data is available.  An exception is raised
        if the previous call to :meth:`execute()` did not produce any result
        set or no call was issued yet.

        When ``fetchone()`` is used to iterate over a result set, the cursor’s
        :attr:`arraysize` attribute can affect performance, as internally data
        is fetched in batches of that size from Oracle Database.
        rh   r   r   r#   s    r   fetchonezCursor.fetchone  s,     	z((...r   c                     |                                   |                     |           | j                            |            dS z
        This can be used to parse a statement without actually executing it
        (parsing step is done automatically by Oracle when a statement is
        :meth:`executed <execute>`).
        Nr(   rb   r   parser[   s     r   r!  zCursor.parse  sD     	i   
r   r   relativemodec                     |                                   | j        j        st          j        t          j                   | j                            | ||           dS ah  
        Scrolls the cursor in the result set to a new position according to the
        mode.

        If mode is *relative* (the default value), the value is taken as an
        offset to the current position in the result set. If set to *absolute*,
        value states an absolute target position. If set to *first*, the cursor
        is positioned at the first row and if set to *last*, the cursor is set
        to the last row in the result set.

        An error is raised if the mode is *relative* or *absolute* and the
        scroll operation would position the cursor outside of the result set.
        Nr(   r   r   r	   rY   ERR_SCROLL_NOT_SUPPORTEDscrollr   rn   r#  s      r   r(  zCursor.scroll  sW     	z$ 	?f=>>>
$t,,,,,r   NN)r   r   r   r   r"  )r   r   r   r   r   rq   r   r   r   r   r   r   ry   r   r   r   r   r   r   r   r?   r  r  r  r  r!  r(  rF   r   r   r   r     s           =c =c =c = = = ==c =c =# =$ = = = = 48-1$ -1$ $ $$ $ U4;/0	$
 %TN$ $D>$ 
$ $ $ $R 48-1	)
 -1)
 )
 )
)
 U4;/0)
 %TN	)
 $D>)
 
)
 )
 )
 )
V       X  :>D
 $)%))-D D DC=D U4#456D
 !D TND !D "D 
D D D DV ""'#(#S! S! S!C=S! S!
 S!  S! !S! S! 
S! S! S! S!j$    6 DH% %SM%3;C=%	% % % %N/# / / / /s t    - -C -3 - - - - - - -r   r   c                      e Zd Zd Zd Zd Zd Z	 	 d&dedede	e
eef                  d	e	e         d
ef
dZ	 	 d&dede	e
eef                  d	e	e         d
efdZed'd            Z	 d(ddddde	e         de	e
eeef                  dede	e         de	e         d	ed
dfdZdddddde	e         dededededed
dfdZd
efdZd(de	e         d
efdZd
efdZded
dfd Zd)d#ed$ed
dfd%ZdS )*AsyncCursorc                 2   K   |                                   | S r&   r'   r#   s    r   
__aenter__zAsyncCursor.__aenter__  s       	r   c                 v   K   |                                   | j                            d           d| _        dS r+   r,   )r   exc_infos     r   	__aexit__zAsyncCursor.__aexit__  s>      
 	
%%%


r   c                     | S )zS
        Returns the cursor itself to be used as an asynchronous iterator.
        rF   r#   s    r   	__aiter__zAsyncCursor.__aiter__$  r   r   c                    K   |                                   | j                            |            d {V }||S t          r   )rh   r   r   StopAsyncIterationr   s     r   	__anext__zAsyncCursor.__anext__*  sO      J--d33333333?J  r   Nr8   r   r9   r:   r   c                    K   |                      |          }|                     ||||           d{V  |                                S )a  
        Calls a PL/SQL function with the given name and returns its value.

        The ``return_type`` parameter is expected to be a Python type, one of
        the :ref:`oracledb types <types>` or an :ref:`Object Type
        <dbobjecttype>`.

        The sequence of parameters must contain one entry for each parameter
        that the PL/SQL function expects. Any keyword parameters will be
        included after the positional parameters.

        Use :meth:`var()` to define any OUT or IN OUT parameters, if necessary.
        N)r}   rB   r   )r   r8   r   r9   r:   r}   s         r   r   zAsyncCursor.callfunc1  sR      ( hh{##jjz+=sCCCCCCCCC||~~r   c                    K   |                      |||           d{V  |g S d | j        j        dt          |                   D             S )a  
        Calls a PL/SQL procedure with the given name.

        The sequence of parameters must contain one entry for each parameter
        that the procedure expects. The result of the call is a modified copy
        of the input sequence. Input parameters are left untouched; output and
        input/output parameters are replaced with possibly new values. Keyword
        parameters will be included after the positional parameters and are not
        returned as part of the output sequence.

        Use :meth:`var()` to define any OUT or IN OUT parameters if necessary.

        No query result set is returned by :meth:`callproc()`.  Instead, use
        :ref:`REF CURSOR <refcur>` parameters or :ref:`Implicit Results
        <implicitresults>`.
        Nc                 8    g | ]}|                     d           S r   r   r   s     r   rJ   z(AsyncCursor.callproc.<locals>.<listcomp>b  r   r   )rB   r   r   rP   )r   r8   r9   r:   s       r   r   zAsyncCursor.callprocI  ss      , jjz+=>>>>>>>>>I
 
$(J$89J3z??9J$K
 
 
 	
r   !connection_module.AsyncConnectionc                     | j         S r   r   r#   s    r   r   zAsyncCursor.connectionf  r   r   Fr   r@   r   r   r   c                   K   |                      |||           | j        }||_        |||_        |||_        | j                            |            d{V  dS )a
  
        Executes a statement against the database. See :ref:`sqlexecution`.

        Parameters may be passed as a dictionary or sequence or as keyword
        parameters. If the parameters are a dictionary, the values will be
        bound by name and if the parameters are a sequence the values will be
        bound by position. Note that if the values are bound by position, the
        order of the variables is from left to right as they are encountered in
        the statement and SQL statements are processed differently than PL/SQL
        statements. For this reason, it is generally recommended to bind
        parameters by name instead of by position.

        Parameters passed as a dictionary are name and value pairs. The name
        maps to the bind variable name used by the statement and the value maps
        to the Python value you wish bound to that bind variable.

        A reference to the statement will be retained by the cursor. If *None*
        or the same string object is passed in again, the cursor will execute
        that statement again without performing a prepare or rebinding and
        redefining.  This is most effective for algorithms where the same
        statement is used, but different parameters are bound to it (many
        times). Note that parameters that are not passed in during subsequent
        executions will retain the value passed in during the last execution
        that contained them.

        The ``suspend_on_success`` parameter is specific to :ref:`sessionless
        transactions <sessionlesstxns>`. When set to *True*, the active
        sessionless transaction will be suspended when ``execute()`` completes
        successfully.  See :ref:`suspendtxns`.

        The ``fetch_lobs`` parameter specifies whether to return LOB locators
        or ``str``/``bytes`` values when fetching LOB columns. The default
        value is :data:`oracledb.defaults.fetch_lobs <Defaults.fetch_lobs>`.

        The ``fetch_decimals`` parameter specifies whether to return
        ``decimal.Decimal`` values when fetching columns of type ``NUMBER``.
        The default value is :data:`oracledb.defaults.fetch_decimals
        <Defaults.fetch_decimals>`.

        For maximum efficiency when reusing a statement, it is best to use the
        :meth:`setinputsizes()` method to specify the parameter types and sizes
        ahead of time; in particular, *None* is assumed to be a string of
        length 1 so any values that are later bound as numbers or dates will
        raise a TypeError exception.

        If the statement is a SELECT query, the cursor is returned as a
        convenience to the caller (so it can be used directly as an iterator
        over the rows in the cursor); otherwise, *None* is returned.
        N)rd   r   r   r   r   r?   r  s           r   r?   zAsyncCursor.executen  sz      v 	!!)Z9KLLLz"4!(DO%"0Dj  &&&&&&&&&&&r   r  r  r  r  r  c                ^  K   |                                   | j                            | |                     |          ||          }|| j        _        |j        dk    rO| j                            | |j        |||j                   d{V  |                                 |j        dk    MdS dS )a  
        Executes a SQL statement once using all bind value mappings or
        sequences found in the sequence parameters. This can be used to insert,
        update, or delete multiple rows in a table with a single
        python-oracledb call. It can also invoke a PL/SQL procedure multiple
        times. See :ref:`batchstmnt`.

        The ``statement`` parameter is managed in the same way as the
        :meth:`execute()` method manages it.

        The ``parameters`` parameter can be a list of tuples, where each tuple
        item maps to one bind variable placeholder in ``statement``. It can
        also be a list of dictionaries, where the keys match the bind variable
        placeholder names in ``statement``. If there are no bind values, or
        values have previously been bound, the ``parameters`` value can be an
        integer specifying the number of iterations. The ``parameters``
        parameter can also be a :ref:`DataFrame <oracledataframeobj>`, or a
        third-party data frame that supports the `Apache Arrow PyCapsule
        <https://arrow.apache.org/docs/
        format/CDataInterface/PyCapsuleInterface.html>`__ Interface.

        In python-oracledb Thick mode, if the size of the buffers allocated for
        any of the parameters exceeds 2 GB, you will receive the error
        ``DPI-1015: array size of <n> is too large``. If you receive this
        error, decrease the number of rows being inserted.

        When True, the ``batcherrors`` parameter enables batch error support
        within Oracle and ensures that the call succeeds even if an exception
        takes place in one or more of the sequence of parameters. The errors
        can then be retrieved using :meth:`getbatcherrors()`.

        When True, the ``arraydmlrowcounts`` parameter enables DML row counts
        to be retrieved from Oracle after the method has completed. The row
        counts can then be retrieved using :meth:`getarraydmlrowcounts()`.

        Both the ``batcherrors`` parameter and the ``arraydmlrowcounts``
        parameter can only be True when executing an insert, update, delete, or
        merge statement. In all other cases, an error will be raised.

        The ``suspend_on_success`` parameter is specific to :ref:`sessionless
        transactions <sessionlesstxns>`. When set to *True*, the active
        sessionless transaction will be suspended when ``executemany()``
        completes successfully. See :ref:`suspendtxns`.

        The ``batch_size`` parameter is used to split large data sets into
        smaller pieces for sending to the database. It is the number of records
        in each batch. This parameter can be used to tune performance. When
        ``Connection.autocommit`` is *True*, a commit will take place for each
        batch. Do not set ``batch_size`` when ``suspend_on_success`` is *True*.

        For maximum efficiency, it is best to use the :meth:`setinputsizes()`
        method to specify the parameter types and sizes ahead of time. In
        particular, the value *None* is assumed to be a string of length 1 so
        any values that are later bound as numbers or dates will raise a
        TypeError exception.
        r   Nr
  r  s           r   r  zAsyncCursor.executemany  s      D 	*55$++I66
J
 
 );
%""*(( !&             """"""r   c                    K   |                                   g }| j        j        }	  ||            d{V }|n|                    |           *|S )a  
        Fetches all (remaining) rows of a SELECT query result, returning them
        as a list of tuples. An empty list is returned if no more rows are
        available. An exception is raised if the previous call to
        :meth:`execute()` did not produce any result set or no call was issued
        yet.

        Note that the cursor's :attr:`~AsyncCursor.arraysize` attribute can
        affect the performance of this operation, as internally data is fetched
        in batches of that size from the database.
        TNr  r  s       r   r  zAsyncCursor.fetchall  su       	2	&t,,,,,,,,C{MM#		
 r   ru   c                   K   |                                   || j        j        }g }| j        j        }t	          |          |k     r< ||            d{V }|n(|                    |           t	          |          |k     <|S )a  
        Fetches the next set of rows of a SELECT query result, returning a list
        of tuples.  An empty list is returned if no more rows are available.
        Note that the cursor's :attr:`arraysize` attribute can affect the
        performance of this operation.

        The number of rows to fetch is specified by the parameter. If it is not
        given, the cursor's :attr:`arraysize` attribute determines the number
        of rows to be fetched. If the number of rows available to be fetched is
        fewer than the amount requested, fewer rows will be returned.

        An exception is raised if the previous call to :meth:`execute()` did
        not produce any result set or no call was issued yet.
        N)rh   r   rm   r   rP   rM   )r   ru   r  r   r   s        r   r  zAsyncCursor.fetchmany  s       	<:'D2&kkD  &t,,,,,,,,C{MM#	 &kkD  
 r   c                 n   K   |                                   | j                            |            d{V S )r  Nr  r#   s    r   r  zAsyncCursor.fetchone4  sB       	Z..t444444444r   c                    K   |                                   |                     |           | j                            |            d{V  dS r  r   r[   s     r   r!  zAsyncCursor.parseB  sZ       	i   jt$$$$$$$$$$$r   r   r"  rn   r#  c                    K   |                                   | j        j        st          j        t          j                   | j                            | ||           d{V  dS r%  r&  r)  s      r   r(  zAsyncCursor.scrollL  sm       	z$ 	?f=>>>jeT22222222222r   r*  )r   r;  r   r+  )r   r   r   r/  r2  r4  r7  r   r   r   r   ry   r   r   r   r   r   r   r   r?   rq   r  r  r  r  r!  r(  rF   r   r   r-  r-    s             ! ! ! 48-1   U4;/0	
 %TN 
   6 48-1	
 

 U4;/0
 %TN	

 

 
 
 
:       X  :>B'
 $)%))-B' B' B'C=B' U4#456B'
 !B' TNB' !B' "B' 
B' B' B' B'R ""'#(#O! O! O!C=O! O!
 O!  O! !O! O! 
O! O! O! O!b    , HSM T    65 5 5 5 5%S %T % % % %3 3# 3 3d 3 3 3 3 3 3r   r-  N)typingr   r   r   r   rL   r   connection_moduler	   r
   baser   	base_implr   r   dbobjectr   
fetch_infor   r}   r   r   r   r-  rF   r   r   <module>rJ     sl  @ 2 1 1 1 1 1 1 1 1 1 1 1 - - - - - -                   - - - - - - - - " " " " " " ! ! ! ! ! !      a	" a	" a	" a	" a	"= a	" a	" a	" a	"H- - - - -Z - - -DK3 K3 K3 K3 K3* K3 K3 K3 K3 K3r   