
    *h"                        S r S/rSSKrSSKrSSKJr  SSKJrJrJ	r	J
r
JrJrJrJrJrJr  SSKJr  SSKJr  SS	KJr  SS
KJrJrJrJrJrJrJrJ r J!r!J"r"  SSK#J$r$J%r%J&r&J'r'J(r(  SSK)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3  SSKJr  SSK4J5r5J6r6  Sr7 " S S5      r8S\9S\	\9\94   S\94S jr: " S S\65      r; " S S\;5      r< " S S\;5      r= " S S\<5      r> " S S\;5      r? " S S \?\<5      r@ " S! S"\;5      rA " S# S$\?\A5      rBg)%z0Implementation of cursor classes in pure Python.MySQLCursor    N)Decimal)
AnyAsyncGeneratorDictIteratorListNoReturnOptionalSequenceTupleUnion   )
deprecated)split_multi_statement)
ServerFlag)
MAX_RESULTSRE_PY_MAPPING_PARAMRE_PY_PARAMRE_SQL_COMMENTRE_SQL_FIND_PARAMRE_SQL_INSERT_STMTRE_SQL_INSERT_VALUESRE_SQL_ON_DUPLICATE RE_SQL_PYTHON_CAPTURE_PARAM_NAMERE_SQL_PYTHON_REPLACE_PARAM)ErrorInterfaceErrorNotSupportedErrorProgrammingErrorget_mysql_exception)
DescriptionTypeEofPacketTypeParamsDictTypeParamsSequenceOrDictTypeParamsSequenceType
ResultTypeRowItemTypeRowType
StrOrBytesWarningType   )MySQLConnectionAbstractMySQLCursorAbstractzNo result set to fetch fromc                   n    \ rS rSrSrS\\   SS4S jrS\R                  S\4S jr
\S\4S	 j5       rS
rg)_ParamSubstitutor\   z+Substitute parameters into a SQL statement.paramsreturnNc                     Xl         SU l        g Nr   )r2   index)selfr2   s     R/var/www/auris/envauris/lib/python3.13/site-packages/mysql/connector/aio/cursor.py__init___ParamSubstitutor.__init___   s    '-
    matchobjc                     U R                   nU =R                   S-  sl          [        U R                  U   5      $ ! [         a    [	        S5      S ef = f)Nr,   z+Not enough parameters for the SQL statement)r6   bytesr2   
IndexErrorr    )r7   r<   r6   s      r8   __call___ParamSubstitutor.__call__c   sS    



a
	U+,, 	"=	s	   ; Ac                 F    [        U R                  5      U R                  -
  $ )z<Return the number of parameters remaining to be substituted.)lenr2   r6   r7   s    r8   	remaining_ParamSubstitutor.remainingm   s     4;;$**,,r;   )r6   r2   )__name__
__module____qualname____firstlineno____doc__r   r>   r9   reMatchr@   propertyintrE   __static_attributes__ r;   r8   r0   r0   \   sN    5x 4  e  -3 - -r;   r0   bytestr
value_dictr3   c                 p   ^ S[         R                  S[        4U4S jjn[        R                  " X 5      nU$ )a@  
>>> _bytestr_format_dict(b'%(a)s', {b'a': b'foobar'})
b'foobar
>>> _bytestr_format_dict(b'%%(a)s', {b'a': b'foobar'})
b'%%(a)s'
>>> _bytestr_format_dict(b'%%%(a)s', {b'a': b'foobar'})
b'%%foobar'
>>> _bytestr_format_dict(b'%(x)s %(y)s',
...                      {b'x': b'x=%(y)s', b'y': b'y=%(x)s'})
b'x=%(y)s y=%(x)s'
r<   r3   c                    > SnU R                  5       nUS   S:X  a  SnUS   S:X  a
  US   nTU   nUc  [        SUS    35      eU$ )zReplace pattern.Nconversion_type   %   smapping_keyzUnsupported conversion_type: )	groupdict
ValueError)r<   valuegroupskeyrS   s       r8   replace%_bytestr_format_dict.<locals>.replace   st    !%##%#$,E#$,'CsOE=/7H0I/JK  r;   )rL   rM   r>   r   sub)rR   rS   r_   stmts    `  r8   _bytestr_format_dictrc   s   s1    "(( u  ""74DKr;   c                      \ rS rSrSrS\4S jrS\4S jrS\	S\
\\\\4   4   4S jrS\S\\\\4   S4   4S	 jrS.S
\S\\   4S jjrS\SS4S jrS/S jrS\SS4S jrS/S jrS\SS4S jrS.S\SS4S jjrS\4S jrS/S jr S0S\S\\\    \
\!\ 4   4   S\4S jjr"S\\#\$      4S jr%S\!S\\&   S\\   4S jr'\(" S5      S\)\*   4S j5       r+ S0S \!S!\\    S\\\
\!\,4   \4      4S" jjr-  S1S\!S\\\    \
\!\ 4   4   S#\SS4S$ jjr.\/" S%5        S1S\!S\\\    \
\!\ 4   4   S#\SS4S& jj5       r0S\!S\\   SS4S' jr1S\\   4S( jr2S\#\   4S) jr3S2S*\\4   S\#\   4S+ jjr5S\\   4S, jr6S-r7g)3r      a  Default cursor for interacting with MySQL.

This cursor will execute statements and handle the result. It will not automatically
fetch all rows.

MySQLCursor should be inherited whenever other functionallity is required.
An example would to change the fetch* member functions to return dictionaries instead
of lists of values.

Implements the Python Database API Specification v2.0 (PEP-249).
r3   c                 T   #    U R                  5       I S h  vN nUb  U$ [        e N7fN)fetchoneStopAsyncIterationr7   ress     r8   	__anext__MySQLCursor.__anext__   s(     MMO#?J   $s   (&(c                    #    U R                   (       d  gU R                   R                  U 5        U R                   R                  5       I S h  vN   U R                  5       I S h  vN   S U l         g N$ N7f)NFT)_connectionremove_cursorhandle_unread_result_reset_resultrD   s    r8   closeMySQLCursor.close   sb     &&t,33555  """ 	6"s$   AA6A2A6%A4&A64A6r2   c                   #    0 n U R                   R                  5       I Sh  vN nU R                   R                  R                  nU R                   R                  R                  nU R                   R                  R
                  nUR                  5        HF  u  pxUn	U" U	5      n	U" X5      n	[        U[        5      (       d  U" U	5      n	XUR                  5       '   MH     U$  N! [         a  n
[        SU
 35      U
eSn
A
ff = f7f)z-Process query parameters given as dictionary.Nz'Failed processing pyformat-parameters; )ro   get_sql_mode	converterto_mysqlescapequoteitems
isinstancer   encode	Exceptionr    )r7   r2   rk   sql_moderx   ry   rz   r^   r\   converrs              r8   _process_params_dict MySQLCursor._process_params_dict   s      !#	!--::<<H''11::H%%//66F$$..44E$lln
~d-!%11 ;D$(CJJL! - 
 =  	"9#?	s9   DC& C$B>C& "D$C& &
D0C??DD.c                 n  #    USS n U R                   R                  5       I Sh  vN nU R                   R                  R                  nU R                   R                  R                  nU R                   R                  R
                  nU Vs/ s H
  ot" U5      PM     nnU Vs/ s H
  ou" Xs5      PM     nn[        U5       VVs/ s H&  u  p[        X   [        5      (       d  U" U5      OUPM(     nnn[        U5      $  Ns  snf s  snf s  snnf ! [         a  n	[        SU	 35      U	eSn	A	ff = f7f)zProcess query parameters.Nz%Failed processing format-parameters; )ro   rv   rw   rx   ry   rz   	enumerater|   r   r~   r    tuple)
r7   r2   resultr   rx   ry   rz   r\   ir   s
             r8   _process_paramsMySQLCursor._process_params   s+     	!--::<<H''11::H%%//66F$$..44E39:6%huo6F:;AB6%fU-6FB !*& 1 1HA %/vy'$B$BeM 1   V} = ;B  	"7u=	sc   D5D DA(D D D &D	7D -D4D 7D5D D 
D2D--D22D5rawc                   #    U R                   R                  (       d  gSnU R                  S:X  aE  U R                   R                  U R                  U R
                  UU R                  S9I Sh  vN u  p#OU R                  u  p#U(       a  U R                   R                  U R                  U R
                  UU R                  S9I Sh  vN U l        U R                  S   nUb  U R                  U5      I Sh  vN   U R                  S:X  a  SU l        OU =R                  S-  sl        U(       a  U R                  U5      I Sh  vN   U$  N N NW N7f)&Return the next row in the result set.NNN)binarycolumnsr   read_timeoutr,   )	ro   unread_result_nextrowget_row_binarydescription_read_timeout_handle_eof	_rowcount)r7   r   roweofs       r8   
_fetch_rowMySQLCursor._fetch_row   s0    --==L(#//77||((!//	  8   JS# JS"&"2"2":":||((!//	 #; # DM --"C&&s+++~~#!"!#""3'''
5 , (sJ   A,E.E/AEE	/E8E9AEEEEEEr   Nc                 >  #    [        U[        5      (       d  [        S5      eSU;   a4  US   U l        SU R                  l        U R                  5       I Sh  vN   gSU;   a+  SU R                  l        U R                  U5      I Sh  vN   g[        S5      e NA N7f)zHandle the result after a command was send.

The result can be either an OK-packet or a dictionary containing column/eof
information.

Raises:
    InterfaceError: When result is not a dict() or result is invalid.
zResult was not a dict()r   TNaffected_rowsFzInvalid result)r|   dictr   _descriptionro   r   _handle_resultset_handle_noresultsetr7   r   s     r8   _handle_resultMySQLCursor._handle_result   s      &$'' !:;; &y 1D-1D*((***&-2D***6222 !122 + 3s$   ABB0BB	BBc                    #    g7f)Handle the result set.

This method handles the result set and is called after reading and storing
column information in _handle_result(). For non-buffering cursors, this method
is usually doing nothing.
NrQ   rD   s    r8   r   MySQLCursor._handle_resultset  s     s   rk   c                    #     US   U l         US   U l        US   U l        U R                  5       I Sh  vN   g! [        [        4 a  n[        SU 35      SeSnAff = f N,7f)z~Handle result of execute() when there is no result set.

Raises:
    ProgrammingError: When failing handling a non-resultset.
r   	insert_idwarning_countzFailed handling non-resultset; N)r   _last_insert_id_warning_countKeyError	TypeErrorr    _handle_warnings)r7   rk   r   s      r8   r   MySQLCursor._handle_noresultset  sy     	V 1DN#&{#3D "%o"6D ##%%% )$ 	V"%DSE#JKQUU	V 	&s/   A$; A$A"A$AAAA$c                   #    U R                   R                  (       a.  U R                  (       a  U R                  5       I Sh  vN U l        U R                  (       d  g[        U R                  S   S   U R                  S   S   U R                   R                  (       + S9nU R                   R                  (       a  Ue[        R                  " USS9  g N7f)zHandle possible warnings after all results are consumed.

Raises:
    Error: Also raises exceptions if raise_on_warnings is set.
Nr   r,   r   )warning   )
stacklevel)	ro   get_warningsr   _fetch_warnings	_warningsr!   raise_on_warningswarningswarn)r7   r   s     r8   r   MySQLCursor._handle_warnings.  s      ((T-@-@#'#7#7#99DN~~!NN1a NN1a ((:::
 --Ica( :s   A CCBCr   c                    #    SU R                   l        SU l        US   U l        U R	                  5       I Sh  vN   g N7f)zHandle EOF packet.Fr   r   N)ro   r   r   r   r   r7   r   s     r8   r   MySQLCursor._handle_eofE  s9     ).&$!/2##%%%s   6A >A preserve_last_executed_stmtc                    #    SU l         SU l        SU l        / U l        SU l        SU l        U(       d#  SU l        / U l        SU l        SU l	        SU l
        U R                  5       I Sh  vN   g N7f)zReset the cursor to default.

Args:
    preserve_last_executed_stmt: If it is False, the last executed
                                 statement value is reset. Otherwise,
                                 such a value is preserved.
Nr   r   r   F)r   r   r   _stored_resultsr   r   	_executed_executed_list_stmt_partitions_stmt_partition_stmt_map_resultsreset)r7   r   s     r8   rr   MySQLCursor._reset_resultL  sm      !!$*!DN"$D$(D!#'D %*D"jjls   A(A2*A0+A2c                 P     U R                   R                  $ ! [         a     gf = f)z(Check whether there is an unread result.F)ro   r   AttributeErrorrD   s    r8   _have_unread_resultMySQLCursor._have_unread_resulte  s+    	##111 		s    
%%c                 <    U R                   c  [        [        5      eg)zoCheck if the statement has been executed.

Raises:
    InterfaceError: If the statement has not been executed.
N)r   r   ERR_NO_RESULT_TO_FETCHrD   s    r8   _check_executedMySQLCursor._check_executedl  s     >>! !788 "r;   	operationc                   #     [        U[        [        45      (       a  UO$UR                  U R                  R
                  5      nU(       a  [        U[        5      (       a#  [        X0R                  U5      I Sh  vN 5      nO[        U[        [        45      (       aT  [        U R!                  U5      I Sh  vN 5      n["        R$                  " XS5      nUR&                  S:w  a  [        S5      eO%[        S[)        U5      R*                   SU S35      eUR-                  SS5      nU$ ! [        [        4 a  n[        [        U5      5      UeSnAff = f N N7f)	zPrepare SQL statement for execution.

Converts the SQL statement to bytes and replaces the parameters in the
placeholders.

Raises:
    ProgrammingError: On converting to bytes, missing parameters or invalid
                      parameters type.
Nr   1Not all parameters were used in the SQL statementzCould not process parameters: (z)), it must be of type list, tuple or dict   %%s   %s)r|   r>   	bytearrayr}   ro   python_charsetUnicodeDecodeErrorUnicodeEncodeErrorr    strr   rc   r   listr   r0   r   r   ra   rE   typerG   r_   )r7   r   r2   rb   r   psubs         r8   _prepare_statementMySQLCursor._prepare_statementu  sG    	6 i%);<< %%d&6&6&E&EF  &$''+ 9 9& AA FT5M22(t/C/CF/K)KL"t2>>Q&*K  '
 '4T&\5J5J4K1VH U> > 
 ||FE*/ #$67 	6"3s8,#5	6 B *LsH   EAD- 5E;E
<=E9E:A3E-E=EEEEc                 n  #    / nU R                   R                  SU R                  U R                  S9I Sh  vN  ISh  vN nUR	                  S5      I Sh  vN   UR                  5       I Sh  vN nSSS5      ISh  vN   U(       a  U$ S$  NY NR N; N% N! , ISh  vN  (       d  f       N,= f7f)z%Fetch warnings doing a SHOW WARNINGS.F)r   r   write_timeoutNzSHOW WARNINGS)ro   cursorr   _write_timeoutexecutefetchall)r7   r   curs      r8   r   MySQLCursor._fetch_warnings  s     ))00++-- 1 
 
 
 
 ++o...<<>)F
 
  v)T)

 /)
 
 
 
s{   5B5BB5 BB5BBB1B2B6B5BB5B5BBB5B2!B$"B2.B5
seq_paramsc           	        #    S[         R                  S[        4S jn[         R                  " [        S[         R                  " [
        X15      5      n[         R                  " [        U5      nU(       d  [        S5      eUR                  S5      R                  U R                  R                  5      n/ n UR                  U R                  R                  5      nU H  n	Un[        U	[        5      (       a#  [        X@R!                  U	5      I Sh  vN 5      nOS[#        U R%                  U	5      I Sh  vN 5      n
[&        R                  " X5      nU
R(                  S:w  a  [+        S	5      eUR-                  U5        M     Xh;   a*  UR/                  US
R1                  U5      S5      nXl        U$ g N N! [4        [6        4 a  n[+        [        U5      5      UeSnAf[8         a    e [:         a  n[        SU 35      SeSnAff = f7f)zImplements multi row insertmatchr3   c                 R    U R                  S5      (       a  gU R                  S5      $ )zRemove comments from INSERT statements.

This function is used while removing comments from INSERT
statements. If the matched string is a comment not enclosed
by quotes, it returns an empty string, else the string itself.
r,    r   )group)r   s    r8   remove_comments2MySQLCursor._batch_insert.<locals>.remove_comments  s"     {{1~~;;q>!r;   r   zAFailed rewriting statement for multi-row INSERT. Check SQL syntaxr,   Nr   r      , Failed executing the operation; )rL   rM   r   ra   r   r   searchr   r   r   r}   ro   r   r|   r   rc   r   r0   r   r   rE   r    appendr_   joinr   r   r   r   r~   )r7   r   r   r   tmpmatchesfmtvaluesrb   r2   r   r   s               r8   _batch_insertMySQLCursor._batch_insert  s    
		"288 		" 		" ffFF>?>
 ))0#6 S  mmA%%d&6&6&E&EF	U##D$4$4$C$CDD$fd++.#<#<V#DDC -43G3G3O-OPD%//$4C~~*.O  c" % {||C6):A>!% E .P #$67 	6"3s8,#5 	 	U #CC5!IJPTT	Us\   B4H
7AF7 F3"F7 4F5
5A<F7 1H
3F7 5F7 7HGH3HHH
zmThe property counterpart 'stored_results' will be added in a future release, and this method will be removed.c                 ,    [        U R                  5      $ )zReturns an iterator for stored results.

This method returns an iterator over results which are stored when callproc()
is called. The iterator will provide MySQLCursorBuffered instances.
)iterr   rD   s    r8   stored_resultsMySQLCursor.stored_results  s     D(())r;   procnameargsc           	        #    U(       a  [        U[        5      (       d  [        S5      e[        U[        [        45      (       d  [        S5      e/ U l        / n / n/ nUR                  S5      S   nU(       a  / n[        U5       H  u  pSU SUS-    3n
UR                  U
5        [        U	[        5      (       a1  UR                  SU
 S	U	S    S
35        UR                  U	S   5        Mg  UR                  U
5        UR                  U	5        M     SR                  S U 5       5      nU R                  SU 3U5      I Sh  vN   SU SSR                  U5       S
3nU R                  R                  nU R                  R                  UU R                  U R                  S9  Sh  vN nSU R                  l        [        U [         ["        45      (       a  ["        nOU R$                  (       a  [&        nO[(        nU" U R                  R+                  5       5      nSU S
3Ul        UR/                  U5      I Sh  vN   UR0                  b  UR0                  U l        SU;   d  M  UR                  U5        M   GN9 N NB
 XR                  l        U(       a  [5        XT V	s/ s H  oR7                  S5      PM     Os  sn	f sn	5       VVs/ s H  u  nnU S	U 3PM     Os  snnf nnnSSR                  U5       3nU R                  U5      I Sh  vN    X0l        U R9                  5       I Sh  vN  $ X0l        [        5       $ ! [:         a    e [<         a  n[?        SU 35      SeSnAff = f7f)a  Calls a stored procedure with the given arguments

The arguments will be set during this session, meaning
they will be called like  _<procname>__arg<nr> where
<nr> is an enumeration (+1) of the arguments.

Coding Example:
  1) Defining the Stored Routine in MySQL:
  CREATE PROCEDURE multiply(IN pFac1 INT, IN pFac2 INT, OUT pProd INT)
  BEGIN
    SET pProd := pFac1 * pFac2;
  END

  2) Executing in Python:
  args = (5, 5, 0)  # 0 is to hold pprod
  await cursor.callproc('multiply', args)
  print(await cursor.fetchone())

For OUT and INOUT parameters the user should provide the
type of the parameter as well. The argument should be a
tuple with first item as the value of the parameter to pass
and second argument the type of the argument.

In the above example, one can call callproc method like:
  args = (5, 5, (0, 'INT'))
  await cursor.callproc('multiply', args)

The type of the argument given in the tuple will be used by
the MySQL CAST function to convert the values in the corresponding
MySQL type (See CAST in MySQL Reference for more information)

Does not return a value, but a result set will be
available when the CALL-statement execute successfully.
Raises exceptions when something is wrong.
zprocname must be a stringzargs must be a sequence.r   z@__argr,   z CAST(z AS )r   ,c              3   *   #    U  H	  o S 3v   M     g7f)z=%sNrQ   ).0args     r8   	<genexpr>'MySQLCursor.callproc.<locals>.<genexpr>9  s     'Hx%sxs   zSET NzCALL r   r   r   Fz(a result of r   zSELECT zFailed calling stored routine; ) r|   r   r[   r   r   r   splitr   r   r   r   ro   can_consume_resultscmd_query_iterr   r   MySQLCursorDictMySQLCursorBufferedDict_rawMySQLCursorBufferedRawMySQLCursorBufferedget_selfr   r   r   r   ziplstriprh   r   r~   r   )r7   r  r  resultsargnamesargtypesprocname_abs	argvaluesidxr  argnameplaceholderscallr  r   cursor_classr   namealiasselectr   s                        r8   callprocMySQLCursor.callproc  s<    P z(C88899$..677!G	THH
 $>>#.r2L	 )$HC "<.S1WI>GOOG,!#u-- &	c!fXQ(GH!((Q0 0!((- !0  #xx'Hx'HHllT,#8)DDD8*Achhx&8%9;D #'"2"2"F"F $ 0 0 ? ?!//"11 !@ ! (f
 8=  4d_6M$NOO#:LYY#9L#6L #4#3#3#<#<#>?"/vQ 7((000<<+%(\\DN&NN3'; E(" 1#!0 4G0 (+ x"Hx::d#3x"H((e fD((  #388D>"23ll6***'.$!]]_,,,#* 7N 	 	T #B3%!HItS	Ts   AM4C)M	 I<A!M	 %J)I?*J-BM	 >J?&M	 )M	 ?JM	 !M	 $J?
>M	 K#"2M	 LM	 3L64M	 8M49M	 M4	M1M,,M11M4map_resultsc                   #    U R                   (       d  [        S5      eU(       d  g U R                   R                  5       I S h  vN   U R                  5       I S h  vN   U R	                  X5      I S h  vN n[        XCS9U l        [        U R                  5      U l        X0l	        U R                  S   U l
        U(       a  U R                  S   R                  5       OU R                  S   U l        U R                  U R                   R                  U R                  S   U R                  U R                   S9I S h  vN 5      I S h  vN   g  GN N N N N7f)NCursor is not connected)sql_coder*  single_stmtsmappable_stmtr  )ro   r    rq   rr   r   r   r   nextr   r   r   popleftr   r   	cmd_queryr   r   )r7   r   r2   r*  rb   s        r8   r   MySQLCursor.executen  sB     "#<==33555  """,,Y?? 5!
  $D$9$9:!,"22>B    088:%%o6 	 !!"",,$$_5!//"11 -  
 	
 	
 3 	6"?	
s[   AEEEEE5E6CE>E?E
EEEEEE\executemulti() is deprecated and will be removed in a future release. Use execute() instead.c                 >   #    U R                  XUS9I S h  vN $  N7f)N)r   r2   r*  )r   r7   r   r2   r*  s       r8   executemultiMySQLCursor.executemulti  s,      \\K " 
 
 	
 
s   c                   #    U(       a  U(       d  gU R                   R                  5       I Sh  vN    [        U5      n[
        R                  " [        U5      (       aJ  U(       d  SU l        gU R                  X5      I Sh  vN nUb  XPl
        U R                  U5      I Sh  vN $ Sn U Hh  nU R                  X5      I Sh  vN   U R                  (       a-  U R                  5       (       a  U R                  5       I Sh  vN   X`R                  -  nMj     X`l        g N! [         a  n[	        S5      UeSnAff = f N N N NC! [        [        4 a  n[	        SU 35      SeSnAff = f7f)zPrepare and execute a MySQL Prepared Statement many times.

This method will prepare the given operation and execute with each tuple found
the list seq_params.

If the cursor instance already had a prepared statement, it is first closed.
N(Parameters for query must be an Iterabler   r   )ro   rq   r   r   r    rL   r   r   r   r   r   r   	with_rowsr   r   r[   )r7   r   r   _r   rb   rowcntr2   s           r8   executemanyMySQLCursor.executemany  sM     
33555	XZ A
 88&	22!"++IBBD!%!\\$///	W$ll9555>>d&>&>&@&@--/))..(	 %  5 	6  	X"#MNTWW	X C 0
 6)I& 	W"%EcU#KLRVV	Ws   -E1D"E1D$  AE1E!E1%E&E1-E
 E=E
 EE
 E1$
D?.D::D??E1E1E
 E
 
E.E))E..E1c                 v   #    U R                   c  [        [        5      eU R                  5       I Sh  vN $  N7f)zReturn next row of a query result set.

Raises:
    InterfaceError: If there is no result to fetch.

Returns:
    tuple or None: A row from query result set.
N)r   r   r   r   rD   s    r8   rh   MySQLCursor.fetchone  s0      >>! !788__&&&&s   0979c                   #    U R                   c  [        [        5      eU R                  R                  (       d  / $ U R                  R                  U R                  S9I Sh  vN u  pU R                  S   (       a  UR                  SU R                  S   5        U R                  U5      I Sh  vN   [        U5      nUS:  a  U R                  S:X  a  SU l        U =R                  U-  sl        U$  N NE7f)qReturn all rows of a query result set.

Returns:
    list: A list of tuples with all rows of a query result set.
Nr   r   r   )r   r   r   ro   r   get_rowsr   r   insertr   rC   r   r7   rowsr   rowcounts       r8   r   MySQLCursor.fetchall  s      >>! !788--I**33ASAS3TT	==KK4==+,s###t9q=T^^r1DN(" U 	$s&   A C8"C4#AC80C61AC86C8sizec                    #    U R                  5         / nU=(       d    U R                  nUS:  a=  US-  nU R                  5       I Sh  vN nU(       a  UR                  U5        US:  a  M=  U$  N&7f)a  Return the next set of rows of a query result set.

When no more rows are available, it returns an empty list.
The number of rows returned can be specified using the size argument, which
defaults to one.

Returns:
    list: The next set of rows of a query result set.
r   r,   N)r   	arraysizerh   r   r7   rK  rk   cntr   s        r8   	fetchmanyMySQLCursor.fetchmany  sg      	$dnnAg1HC'C

3	 Ag 
	 (s   AA1A/	"A1-A1c                 .  #    U R                   R                  (       Ga  U R                   R                  5       I S h  vN   U R                  SS9I S h  vN   U R	                  U R                   R	                  U R                   R
                  R                  U R                  S9I S h  vN 5      I S h  vN 5      I S h  vN   U R                  b^  U R                  (       aM  U R                  S   (       d  [        R                  " S5        gU R                  S   R                  5       U l        gU R                  b   [        U R                  5      U l
        U R                  S   R                  5       U l        U R	                  U R                   R!                  U R                  S   U R                  U R"                  S9I S h  vN 5      I S h  vN   gU R                  5       I S h  vN   g  GN GN GNN GNE GN< N9 N/! [$         a     N8f = f N(7f)NT)r   rD  r.  zOMappingWarning: Number of result sets greater than number of single statements.r/  r  )ro   _have_next_resultrq   rr   r   _socketreadr   r   r   r   r   r   r1  r   r0  r2  r   StopIterationrD   s    r8   nextsetMySQLCursor.nextset  s    ---""77999$$$FFF%%&&55**2277TEWEW7XX    $$0T5K5K++N; MM0  &*%9%9.%I%Q%Q%SDN  ,'+D,A,A'B$ "&!5!5n!E!M!M!O))**44,,_=%)%7%7&*&9&9 5       """e :F YN !   	#s   :HG0HG3AH(G6)H4G95H G<A=H?H A,HG?HHH*H+H3H6H9H<H?HH
HHHH)ro   r   r   r   r   r   r   r   r   r   r   r   r   Fr3   NrQ   rQ   Frg   )8rG   rH   rI   rJ   rK   r)   rl   boolrs   r$   r   r>   r   r   r   r&   r   r   r   r   r'   r   r   r   r   r#   r   rr   r   r   r*   r   r   r   r   r	   r+   r   r%   r   deprecated_syncr   r.   r  r(   r(  r   r   r7  r>  rh   r   rO   rP  rW  rP   rQ   r;   r8   r   r      s   
! !T $	eU5'>**	+.(	uUG^$c)	*,!D !Xg5F !F3: 3$ 30&Z &D &).&] &t &t PT 2T 9 8:++ hsmT#s(^34+ 
	+Z
*x[0A'B 
*8U8U*23K*L8U	%8Ut 	+*)< = *	* !xTxT smxT 
%S+-.78	9	xTz 8:!	%% hsmT#s(^34% 	%
 
%N 	# 8:!	

 hsmT#s(^34
 	

 

	
( (  /0(  
	( T' 1 'W .HSM T'] *5x~ 5r;   c            	          ^  \ rS rSrSr  SS\S\\   S\\   SS4U 4S jjjrSS	 jr	SS
\
S\\   4S jjrSS\
SS4S jjrS\\   4S jrS\\   4S jr\S\
4S j5       rSrU =r$ )r  i>  z+Cursor which fetches rows within execute().N
connectionr   r   r3   c                 B   > [         TU ]  XU5        S U l        SU l        g r5   )superr9   _rows	_next_rowr7   r`  r   r   	__class__s       r8   r9   MySQLCursorBuffered.__init__A  s"     	=A.2
r;   c                 &  #    U R                   R                  U R                  U R                  S9I Sh  vN u  U l        n[        U R                  5      U l        U R                  U5      I Sh  vN   SU l        SU R                   l	        g NX N7f)r   r   r   Nr   F)
ro   rE  r  r   rc  rC   r   r   rd  r   r   s     r8   r   %MySQLCursorBuffered._handle_resultsetK  s      !% 0 0 9 9		(:(: !: !
 

C TZZs###).&
 	$s!   2BB:B/B0BBr   c                    #    Sn U R                   U R                     nU =R                  S-  sl        U$ ! [        [        4 a     gf = f7f)r   Nr,   )rc  rd  r?   r   )r7   r   r   s      r8   r   MySQLCursorBuffered._fetch_rowZ  sN     	**T^^,C 	!
 I& 		s%   A6 AA	AA		Afreec                    #    SU l         g7f)zReset the cursor to default.Nrc  r7   rm  s     r8   r   MySQLCursorBuffered.resetd  s     
s   	c                 ^   #    U R                  5         U R                  5       I Sh  vN $  N7faReturn next row of a query result set.

Returns:
    tuple or None: A row from query result set.
Nr   r   rD   s    r8   rh   MySQLCursorBuffered.fetchoneh  s&      	__&&&&s   $-+-c                    #    U R                   c  [        [        5      eU R                  c  / $ / nU R                  U R                  S n[        U R                  5      U l        U$ 7frC  N)r   r   r   rc  rd  rC   rj   s     r8   r   MySQLCursorBuffered.fetchallq  sZ      >>! !788::Ijj)*TZZ
s   A#A%c                     U R                   S L$ rg   ro  rD   s    r8   r;  MySQLCursorBuffered.with_rows      zz%%r;   )rd  r   rc  r   rZ  rY  T)rG   rH   rI   rJ   rK   r-   r   rO   r9   r   r]  r)   r   r   rh   r	   r   rN   r;  rP   __classcell__rf  s   @r8   r  r  >  s    5
 '+'+	 +  sm   }	 
 
   /D Xg5F   ' 1 'W  &4 & &r;   r  c            	       |   ^  \ rS rSrSr  SS\S\\   S\\   SS4U 4S jjjrS\\	   4S	 jr
S\\	   4S
 jrSrU =r$ )MySQLCursorRawi  zHSkip conversion from MySQL datatypes to Python types when fetching rows.Nr`  r   r   r3   c                 4   > [         TU ]  XU5        SU l        g NTrb  r9   r  re  s       r8   r9   MySQLCursorRaw.__init__       	=A	r;   c                 \   #    U R                  5         U R                  SS9I Sh  vN $  N7f)rt  T)r   Nru  rD   s    r8   rh   MySQLCursorRaw.fetchone  s*      	___....s   #,*,c                   #    U R                  5         U R                  5       (       d  / $ U R                  R                  SU R                  S9I Sh  vN u  pU R
                  S   (       a  UR                  SU R
                  S   5        U R                  U5      I Sh  vN   [        U5      nUS:  a  U R                  S:X  a  SU l	        U =R                  U-  sl	        U$  N NE7f)rC  Tri  Nr   r   )
r   r   ro   rE  r   r   rF  r   rC   r   rG  s       r8   r   MySQLCursorRaw.fetchall  s      	''))I**334#5#5 4 
 
	 ==KK4==+,s###t9q=T^^r1DN("

 	$s&   AC'C#AC'C% AC'%C')r  r   r   )rG   rH   rI   rJ   rK   r-   r   rO   r9   r)   rh   r	   r   rP   r~  r  s   @r8   r  r    sl    R
 '+'+	+ sm  }	
 
 / 1 /W  r;   r  c            	       l   ^  \ rS rSrSr  SS\S\\   S\\   SS4U 4S jjjr\	S\
4S	 j5       rS
rU =r$ )r  i  zz
Cursor which skips conversion from MySQL datatypes to Python types when
fetching rows and fetches rows within execute().
Nr`  r   r   r3   c                 4   > [         TU ]  XU5        SU l        g r  r  re  s       r8   r9   MySQLCursorBufferedRaw.__init__  r  r;   c                     U R                   S L$ rg   ro  rD   s    r8   r;   MySQLCursorBufferedRaw.with_rows  r|  r;   )r  r   )rG   rH   rI   rJ   rK   r-   r   rO   r9   rN   r]  r;  rP   r~  r  s   @r8   r  r    sc     '+'+	+ sm  }	
 
  &4 & &r;   r  c            
          ^  \ rS rSrSr S
S\S\\\      S\\	\
\4      4S jjrS\\	\
\4      4U 4S jjrS\\\	\
\4         4U 4S jjrS	rU =r$ )r  i  z
Cursor fetching rows as dictionaries.

The fetch methods of this class will return dictionaries instead of tuples.
Each row is a dictionary that looks like:
    row = {
        "col1": value1,
        "col2": value2
    }
rowdatadescr3   c                 R    U(       a  [        [        U R                  U5      5      $ S$ )zGConvert a MySQL text result row to Python types

Returns a dictionary.
N)r   r  column_namesr7   r  r  s      r8   _row_to_pythonMySQLCursorDict._row_to_python  s$     9@tC))734ITIr;   c                 p   >#    U R                  [        TU ]	  5       I Sh  vN U R                  5      $  N7f)zaReturn next row of a query result set.

Returns:
    dict or None: A dict from query result set.
N)r  rb  rh   r   r7   rf  s    r8   rh   MySQLCursorDict.fetchone  s/      "")9);#;T=M=MNN#;s   646c                    >#    [         TU ]  5       I Sh  vN  Vs/ s H'  nU(       d  M  U R                  XR                  5      PM)     sn$  N7s  snf 7f)zReturn all rows of a query result set.

Returns:
    list: A list of dictionaries with all rows of a query
          result set where column names are used as keys.
N)rb  r   r  r   )r7   r   rf  s     r8   r   MySQLCursorDict.fetchall  sT      #W-///
/ 7D%5%56/
 	
/
s%   AAAAA
AArQ   rg   )rG   rH   rI   rJ   rK   r)   r   r	   r"   r   r   r(   r  rh   r   rP   r~  r  s   @r8   r  r    s    	 15	J	J tO,-	J 
$sK'(	)		JOc;.>)? @ O
Xd33C.D%E F 
 
r;   r  c                   Z    \ rS rSrSrS\\\\4      4S jr	S\
\\\\4         4S jrSrg)r  i  z0
Buffered Cursor fetching rows as dictionaries.
r3   c                    #    U R                  5         U R                  5       I Sh  vN nU(       a  U R                  XR                  5      $ g N'7frs  )r   r   r  r   )r7   r   s     r8   rh    MySQLCursorBufferedDict.fetchone  sD      	OO%%&&s,<,<== &s   $AA(Ac                 ,  #    U R                   b  U R                  c  [        [        5      e/ nU R                  U R                  S  H-  nUR                  U R                  X R                  5      5        M/     [        U R                  5      U l        U$ 7frx  )	r   rc  r   r   rd  r   r  r   rC   )r7   rk   r   s      r8   r    MySQLCursorBufferedDict.fetchall  sv      >>!TZZ%7 !788::dnn./CJJt**30@0@AB 0TZZ
s   BB)rd  N)rG   rH   rI   rJ   rK   r   r   r   r(   rh   r	   r   rP   rQ   r;   r8   r  r    sB    
c;.>)? @ 
Xd33C.D%E F r;   r  c                     ^  \ rS rSrSr  S'S\S\\   S\\   4U 4S jjjrS(S\	S	S4S
 jjr
S\S	S4U 4S jjrS\S	S4S jrS\S	S4U 4S jjrS)S\S\S	\4S jjr\" S5        S*S\S\\\   \\\4   4   S\	S	\\S4   4S jj5       rS+U 4S jjrS,S\S\S	\4S jjrS\S	S4S jr  S-S\S\\   S\	S	S4S jjr S\S \\!   S	S4S! jr"S	\\#   4S" jr$S,S#\\   S	\%\#   4S$ jjr&S	\%\#   4S% jr'S&r(U =r)$ ).MySQLCursorPreparedi  z&Cursor using MySQL Prepared StatementsNr`  r   r   c                    > [         TU ]  XU5        S U l        SU l        S U l        SU l        S U l        SU l        SU l        g )Nr   TF)	rb  r9   rc  rd  	_preparedr   _have_result_last_row_sent_cursor_existsre  s       r8   r9   MySQLCursorPrepared.__init__  sH     	=A.2
QU!,0$)$)r;   rm  r3   c                   #    U R                   (       aL   U R                  R                  U R                   S   U R                  U R                  S9I S h  vN   S U l         SU l        SU l        g  N! [
         a     N$f = f7f)Nstatement_idr  F)r  ro   cmd_stmt_closer   r   r   r  r  rp  s     r8   r   MySQLCursorPrepared.reset#  s     >>&&55NN>2!%!3!3"&"5"5 6    "DN##
  s:   B?A1 A/A1 B/A1 1
A>;B=A>>Brk   c           	         >#    U R                  UR                  SUR                  SS5      5      5        [        TU ]  U5      I S h  vN   g  N7fNstatus_flagserver_statusr   )_handle_server_statusgetrb  r   )r7   rk   rf  s     r8   r   'MySQLCursorPrepared._handle_noresultset2  sB     ""GGM377?A#>?	
 g)#...   AAAAflagsc                 p    U[         R                  -  S:g  U l        U[         R                  -  S:g  U l        g r5   )r   STATUS_CURSOR_EXISTSr  STATUS_LAST_ROW_SENTr  )r7   r  s     r8   r  )MySQLCursorPrepared._handle_server_status8  s2    #j&E&EEJ#j&E&EEJr;   r   c           	         >#    U R                  UR                  SUR                  SS5      5      5        [        TU ]  U5      I S h  vN   g  N7fr  )r  r  rb  r   )r7   r   rf  s     r8   r   MySQLCursorPrepared._handle_eof<  sB     ""GGM377?A#>?	
 g!#&&&r  r  r  c                    #    [        5       e7f)zACalls a stored procedue

Not supported with MySQLCursorPrepared.
r   )r7   r  r  s      r8   r(  MySQLCursorPrepared.callprocB  s     
  !!   r4  r   r2   r*  c                    #    [        5       e7f)zoExecute multiple statements.

Executes the given operation substituting any markers with the given
parameters.
r  r6  s       r8   r7   MySQLCursorPrepared.executemultiI  s       !!r  c                 r   >#    U R                  5       I Sh  vN   [        TU ]	  5       I Sh  vN   g N N7f)zbClose the cursor

This method will try to deallocate the prepared statement and close
the cursor.
N)r   rb  rs   r  s    r8   rs   MySQLCursorPrepared.closeZ  s.      jjlgmo 	s   737577r  r  c                     g)zvConvert row data from MySQL to Python types

The conversion is done while reading binary data in the protocol module.
NrQ   r  s      r8   r  "MySQLCursorPrepared._row_to_pythonc  s    r;   r   c                 f  #    [        U[        5      (       a2  SU R                  l        SU l        U R                  U5      I Sh  vN   gUS   U l        SU R                  l        SU l        SUS   ;   a  U R                  US   S   5        gSUS   ;   a  U R                  US   S   5        gg Nj7f)zHandle result after executionFNr,   Tr  r   r  )r|   r   ro   r   r  r   r   r  r   s     r8   r   "MySQLCursorPrepared._handle_resulti  s     fd##-2D* %D**6222 &q	D-1D* $Dq	)**6!9]+CD F1I-**6!9_+EF . 3s   AB1B/A+B1c                 J  ^#    U(       a  [        S5      eU R                  (       d  [        S5      eU(       d  gU R                  R                  nUS:X  a  Sn[        U[        5      (       d   UR                  U5      n[        T[        5      (       aM  [        R                  " [        U5      n [        U4S jU 5       5      m[        R                  " [        SU5      nXR                  La  U R                   (       aD  U R                  R#                  U R                   S	   U R$                  U R&                  S
9I Sh  vN   Xl         UR)                  U5      nUR-                  SS5      nSU;   a  [        R                  " [.        SU5      n U R                  R1                  UU R$                  U R&                  S
9I Sh  vN U l        U R                  R5                  U R                   S	   U R$                  U R&                  S
9I Sh  vN   U R                   S   (       a  T(       d  gT(       an  [        T[        [6        45      (       d$  [        SS[9        T5      R:                   ST S3S9e[=        U R                   S   5      [=        T5      :w  a
  [        SSS9eTc  SmU R                  R?                  U R                   S	   TU R                   S   U R$                  U R&                  S9I Sh  vN nU RA                  U5      I Sh  vN   g! [         a  n[        [	        U5      5      UeSnAff = f! [         a  n[        S5      UeSnAff = f GN! [*         a  n[        [	        U5      5      UeSnAff = f GN! [2         a	    SU l        e f = f GN N N7f)a  Prepare and execute a MySQL Prepared Statement

This method will prepare the given operation and execute it using
the optionally given parameters.

If the cursor instance already had a prepared statement, it is
first closed.

*Argument "map_results" is unused as multi statement execution
is not supported for prepared statements*.

Raises:
    ProgrammingError: When providing a multi statement operation
                      or setting *map_results* to True.
z@Multi statement execution not supported for prepared statements.r,  Nutf8mb4utf8c              3   .   >#    U  H
  nTU   v   M     g 7frg   rQ   )r  r^   r2   s     r8   r  .MySQLCursorPrepared.execute.<locals>.<genexpr>  s     G6Fsvc{6Fs   z6Not all placeholders were found in the parameters dict?r  r  r   r      ?
parametersi  zIncorrect type of argument: r   zP), it must be of type tuple or list the argument given to the prepared statement)errnomsgz:Incorrect number of arguments executing prepared statementrQ   )datar  r   r   )!r    ro   charsetr|   r   decoder   r   rL   findallr   r   r   ra   r   r   r  r  r   r   r}   r   r_   r   cmd_stmt_preparer   cmd_stmt_resetr   r   rG   rC   cmd_stmt_executer   )r7   r   r2   r*  r  r   replacement_keysrk   s     `     r8   r   MySQLCursorPrepared.executex  sx    * "R  "#<==""**iG)S)):%,,W5	 fd##!zz*JIVG6FGG :CKINN*~~&&55NN>2!%!3!3"&"5"5 6   
 'N:%,,W5	
 "))&%8I	!FF#4dIF	'+'7'7'H'H!%!3!3"&"5"5 (I ( " --NN>*++-- . 
 	
 	
 >>,'fudm44&6F|,,-Qvh 7--  4>>,/0CK?&T 
 >F$$55NN>*~~l3++-- 6 
 
 !!#&&&[ & :&s3x0c9:  &L & :&s3x0c9:"
  !%	
2
 	's   A*N#.L ?0N#0L; A:N#?M 
N#M 4N#2N N	N ?N#NC(N#5N6N#N!N#
L8L33L88N#;
MMMN#
N &M;;N  N#N NN#N#!N#r   c                 
  #    U(       a  U(       d  gU R                   R                  5       I Sh  vN    [        U5      nSn U Hh  nU R                  X5      I Sh  vN   U R                  (       a-  U R                  5       (       a  U R                  5       I Sh  vN   XPR                  -  nMj     XPl	        g N! [         a  n[	        S5      UeSnAff = f N{ N?! [        [        4 a  n[        SU 35      SeSnAff = f7f)a  Prepare and execute a MySQL Prepared Statement many times

This method will prepare the given operation and execute with each
tuple found the list seq_params.

If the cursor instance already had a prepared statement, it is
first closed.

executemany() simply calls execute().
Nr:  r   r   )ro   rq   r   r   r    r   r;  r   r   r   r[   r   )r7   r   r   r<  r   r=  r2   s          r8   r>  MySQLCursorPrepared.executemany  s      
33555	XZ A 	U$ll9555>>d&>&>&@&@--/))..(	 %  ! 	6  	X"#MNTWW	X 6)I& 	U #CC5!IJPTT	Usz   -DB8DB:  DC C=C CC 1D:
CCCDC C D ,C;;D  Dc                   #    U R                  5         U R                  (       aD  U R                  R                  U R                  S   U R
                  U R                  S9I Sh  vN   U R                  5       I Sh  vN =(       d    S$  N% N7f)rt  r  r  N)r   r  ro   cmd_stmt_fetchr  r   r   r   rD   s    r8   rh   MySQLCursorPrepared.fetchone  s~      	""11~.!//"11 2   
 __&&.$.
 's$   A!B#B	$B;B<BBrK  c                 :  #    U R                  5         / nU=(       d    U R                  nUS:  ag  U R                  5       (       aR  US-  nU R                  5       I Sh  vN nU(       a  UR	                  U5        US:  a  U R                  5       (       a  MR  U$  N;7f)a  Return the next set of rows of a query result set.

When no more rows are available, it returns an empty list.
The number of rows returned can be specified using the size argument,
which defaults to one.

Returns:
    list: The next set of rows of a query result set.
r   r,   N)r   rM  r   r   r   rN  s        r8   rP  MySQLCursorPrepared.fetchmany   s      	$dnnAg$22441HC))C

3	 Ag$2244
 
 *s   ABB7BBc                   #    U R                  5         / nU R                  S   (       a  UR                  U R                  S   5        U R                  5       (       a  U R                  (       aI  U R
                  R                  U R                  S   [        U R                  U R                  S9I Sh  vN   U R
                  R                  U R                  U R                  U R                  S9I Sh  vN u  p#UR                  U5        U R                  U5      I Sh  vN   U R                  5       (       a  M  [!        U5      U l        U$  N N[ N17f)rC  r   r  r  N)r   r   r   )r   r   r   r   r  ro   r  r  r   r   r   rE  r   r   extendr   rC   r   )r7   rH  r   r   s       r8   r   MySQLCursorPrepared.fetchall4  s&     	==KKa()&&((""&&55NN>2!%!3!3"&"5"5	 6    "--66||((!// 7  HC
 KK""3''' &&(( T (s=   B/E1E2A E2E3+EEE:EEE)
r   r  r   r   r  r  rd  r  r   rc  r   r}  r[  r\  rZ  rg   )NF)*rG   rH   rI   rJ   rK   r-   r   rO   r9   r]  r   r'   r   r  r#   r   r   r
   r(  r   r   r   r   r   r   r.   r7  rs   r  r   r*   r%   r   r&   r>  r)   rh   r	   rP  r   rP   r~  r  s   @r8   r  r    s   0
 '+'+	*+* sm*  }	* *$ $ $/Z /D /K3 K4 K'] 't '"s "# "x " 	# 8:!	"" hsmT#s(^34" 	"
 
+T1	2"	"c   G: G$ G$ 6:!	t't' 12t' 	t'
 
t'l! !  /0!  
	! F/ 1 /HSM T'] (W  r;   r  c                   T   ^  \ rS rSrSr SS\\   S\\\	\
4      4U 4S jjjrSrU =r$ )MySQLCursorPreparedDictiQ  a  
This class is a blend of features from MySQLCursorDict and MySQLCursorPrepared

Multiple inheritance in python is allowed but care must be taken
when assuming methods resolution. In the case of multiple
inheritance, a given attribute is first searched in the current
class if it's not found then it's searched in the parent classes.
The parent classes are searched in a left-right fashion and each
class is searched once.
Based on python's attribute resolution, in this case, attributes
are searched as follows:
1. MySQLCursorPreparedDict (current class)
2. MySQLCursorDict (left parent class)
3. MySQLCursorPrepared (right parent class)
4. MySQLCursor (base class)
rK  r3   c                    >#    [         TU ]  US9I Sh  vN  Vs/ s H'  nU(       d  M  U R                  X R                  5      PM)     sn$  N7s  snf 7f)a`  Return the next set of rows of a query result set.

When no more rows are available, it returns an empty list.
The number of rows returned can be specified using the size argument,
which defaults to one.

Returns:
    list: The next set of rows of a query result set represented
          as a list of dictionaries where column names are used as keys.
)rK  N)rb  rP  r  r   )r7   rK  r   rf  s      r8   rP  !MySQLCursorPreparedDict.fetchmanyc  sY      #W.D.999
9 7D%5%569
 	
9
s%   AAAAA	AArQ   rg   )rG   rH   rI   rJ   rK   r   rO   r	   r   r   r(   rP  rP   r~  r  s   @r8   r  r  Q  s:    $ %)
SM
	d3#$	%
 
r;   r  )CrK   __all__rL   r   decimalr   typingr   r   r   r   r	   r
   r   r   r   r   _decoratingr   r^  
_scriptingr   	constantsr   r   r   r   r   r   r   r   r   r   r   r   errorsr   r   r   r    r!   typesr"   r#   r$   r%   r&   r'   r(   r)   r*   r+   	abstractsr-   r.   r   r0   r>   rc   r   r  r  r  r  r  r  r  rQ   r;   r8   <module>r     s  > 7/ 	     8 . "      $ C6 - -.% T%,5G E @h
% h
VD&+ D&N([ (V&0 &(*
k *
Zo/B @}+ }@
#
o/B #
r;   