Ë
    ðmxiAD  ã                  óL  — d dl mZ d dlZd dlZd dl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
 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 ddlmZ ddlmZ  ej*                  e«      ZdZ G d„ d«      Zd„ Zd„ Zd„ Zd„ Zd„ Zej>                  d„ «       Z ej>                  d„ «       Z!d„ Z"ej>                  d„ «       Z#ej>                  d„ «       Z$d„ Z%d„ Z&d„ Z'ej>                  d „ «       Z(ej>                  d!„ «       Z)d"„ Z*ejW                  e*«      d#„ «       Z,ej>                  d$„ «       Z-ej>                  d%„ «       Z.ej>                  d&„ «       Z/ej>                  d'„ «       Z0ej>                  d(„ «       Z1d)„ Z2ej>                  d*„ «       Z3ej>                  d+„ «       Z4ej>                  d,„ «       Z5ej>                  d-„ «       Z6ej>                  d.„ «       Z7ej>                  dd/d0œd1„«       Z8ej>                  d2„ «       Z9ej>                  d3„ «       Z:ed4„ «       Z;ej>                  d5„ «       Z<y)6é    )ÚannotationsNé   )Úconfig)Úengines)Úutilé   )Úexc)Úinspect)Ú
Connection)ÚEngine)Úurl)Úsort_tables_and_constraints)Úddl©Úschema)Ú	decoratorc                  óF   — e Zd Zdd„Zed„ «       Zed„ «       Zd„ Zd„ Zd„ Z	y)	ÚregisterNc                ó    — i | _         || _        y ©N)Úfnsr   )Úselfr   s     úS/home/htdocs/ttos/venv/lib/python3.12/site-packages/sqlalchemy/testing/provision.pyÚ__init__zregister.__init__#   s   € ØˆŒØ"ˆ�ó    c                ó@   —  t        «       j                  d«      |«      S ©NÚ*©r   Úfor_db)ÚclsÚfns     r   Úinitzregister.init'   s   € à%Œx‹z× Ñ  Ó% bÓ)Ð)r   c                ó6   — t        |«      j                  d«      S r   r   )r!   r   s     r   Úinit_decoratorzregister.init_decorator+   s   € ä˜	Ó"×)Ñ)¨#Ó.Ð.r   c                ó   ‡ ‡— ˆˆ fd„}|S )Nc                ón   •— ‰j                   r‰j                  | «      } ‰D ]  }| ‰j                  |<   Œ ‰S r   )r   r   )r"   ÚdbnameÚdbnamesr   s     €€r   Údecoratez!register.for_db.<locals>.decorate0   s:   ø€ Ø�~Š~Ø—^‘^ BÓ'�Ø!ò &�Ø#%�—‘˜Ò ð&àˆKr   © )r   r)   r*   s   `` r   r    zregister.for_db/   s   ù€ õ	ð ˆr   c                ó4   —  | j                   d   |g|¢­i |¤ŽS r   )r   )r   ÚcfgÚargÚkws       r   Úcall_originalzregister.call_original9   s!   € Øˆt�x‰x˜‰}˜SÐ- 3Ò-¨"Ñ-Ð-r   c                ó®  — t        |t        «      rt        j                  |«      }n`t        |t        j                  «      r|}nCt        |t
        t        f«      r|j                  j                  }n|j                  j                  }|j                  «       }|| j                  v r | j                  |   |g|¢­i |¤ŽS  | j                  d   |g|¢­i |¤ŽS r   )Ú
isinstanceÚstrÚsa_urlÚmake_urlÚURLr   r   Úenginer   ÚdbÚget_backend_namer   )r   r-   r.   r/   r   Úbackends         r   Ú__call__zregister.__call__<   s¯   € Ü�cœ3ÔÜ—/‘/ #Ó&‰CÜ˜œVŸZ™ZÔ(Ø‰CÜ˜œf¤jÐ1Ô2Ø—*‘*—.‘.‰Cà—&‘&—*‘*ˆCØ×&Ñ&Ó(ˆØ�d—h‘hÑØ$�4—8‘8˜GÑ$ SÐ5¨3Ò5°"Ñ5Ð5à �4—8‘8˜C‘= Ð1 sÒ1¨bÑ1Ð1r   r   )
Ú__name__Ú
__module__Ú__qualname__r   Úclassmethodr#   r%   r    r0   r;   r+   r   r   r   r   "   s>   „ ó#ð ñ*ó ð*ð ñ/ó ð/òò.ó2r   r   c                ó¦   — t        «       D ]D  }t        j                  d| |j                  j                  «       t        ||j                  | «       ŒF y )NzCREATE database %s, URI %r)Ú_configs_for_db_operationÚlogÚinfor8   r   Ú	create_db©Úfollower_identr-   s     r   Úcreate_follower_dbrG   L   s=   € Ü(Ó*ò /ˆÜ�‰Ð-¨~¸s¿v¹v¿z¹zÔJÜ�#�s—v‘v˜~Õ.ñ/r   c                ó¬  — t        j                  | «      j                  «       }|j                  «        |rt	        | |«      } i }t        | ||«       d|d<   t        j                  | |«      }t        | ||«       |j                  «       j                  «        t        j                  j                  ||||«      }|r|t        _        |rt        ||«       |S )NÚglobalÚscope)r4   r5   Úget_dialectÚload_provisioningÚfollower_url_from_mainÚupdate_db_optsr   Útesting_engineÚpost_configure_engineÚconnectÚcloser   ÚConfigr   ÚidentÚconfigure_follower)Údb_urlÚoptionsÚfile_configrF   ÚdialectÚdb_optsÚengr-   s           r   Úsetup_configr\   R   s¹   € ô �o‰o˜fÓ%×1Ñ1Ó3€Gà×ÑÔáÜ'¨°Ó?ˆØ€GÜ�6˜7 GÔ,Ø€GˆGÑÜ
×
 Ñ
  ¨Ó
1€Cä˜& # ~Ô6à‡K�KƒM×ÑÔä
�-‰-×
 Ñ
   g¨w¸Ó
D€Cñ Ø%ŒŒáÜ˜3 Ô/Ø€Jr   c                ó¦   — t        «       D ]D  }t        j                  d| |j                  j                  «       t        ||j                  | «       ŒF y )NzDROP database %s, URI %r)rA   rB   rC   r8   r   Údrop_dbrE   s     r   Údrop_follower_dbr_   q   s=   € Ü(Ó*ò -ˆÜ�‰Ð+¨^¸S¿V¹V¿Z¹ZÔHÜ��S—V‘V˜^Õ,ñ-r   c              #  óT  K  — t        «       }t        j                  t         «      }| D �cg c]  }t        j                  |«      ‘Œ c}D �cg c]  }||j                  «       f‘Œ }}|D ]3  \  }}|j                  «       }||j                     j                  |«       Œ5 i }	|D ]x  \  }}|j                  }
|j                  «        |
|	vr#t        |«      j                  ||
   «      x|	|
<   }n|	|
   }t        ||«      D ]  }||v rŒ|j                  |«       |–— Œ Œz yc c}w c c}w ­w)ar  Generate a set of URLs to test given configured URLs plus additional
    driver names.

    Given:

    .. sourcecode:: text

        --dburi postgresql://db1          --dburi postgresql://db2          --dburi postgresql://db2          --dbdriver=psycopg2 --dbdriver=asyncpg?async_fallback=true

    Noting that the default postgresql driver is psycopg2,  the output
    would be:

    .. sourcecode:: text

        postgresql+psycopg2://db1
        postgresql+asyncpg://db1
        postgresql+psycopg2://db2
        postgresql+psycopg2://db3

    That is, for the driver in a --dburi, we want to keep that and use that
    driver for each URL it's part of .   For a driver that is only
    in --dbdrivers, we want to use it just once for one of the URLs.
    for a driver that is both coming from --dburi as well as --dbdrivers,
    we want to keep it in that dburi.

    Driver specific query options can be specified by added them to the
    driver name. For example, to enable the async fallback option for
    asyncpg::

    .. sourcecode:: text

        --dburi postgresql://db1          --dbdriver=asyncpg?async_fallback=true

    N)ÚsetÚcollectionsÚdefaultdictr4   r5   rK   Úget_driver_nameÚnameÚaddrL   Ú
differenceÚ_generate_driver_urls)Údb_urlsÚextra_driversÚurlsÚ!backend_to_driver_we_already_haverV   Úurl_objÚurls_plus_dialectsrY   Údriver_nameÚbackend_to_driver_we_needr:   Úextra_per_backendÚ
driver_urls                r   Úgenerate_db_urlsrs   w   sV  è ø€ ôN ‹5€Dä(3×(?Ñ(?ÄÓ(DÐ%ð ?FÖF°FœŸ™¨Õ/ÒFöàð 
�'×%Ñ%Ó'Ò(ðÐð ð
 /ò IÑˆ�ð ×-Ñ-Ó/ˆØ)¨'¯,©,Ñ7×;Ñ;¸KÕHð	Ið !#Ðà.ò Ñˆ�Ø—,‘,ˆØ×!Ñ!Ô#àÐ3Ñ3ÜEHØóFç‰jÐ:¸7ÑCÓDðEÐ% gÑ.Ñ1Bð !:¸'Ñ BÐä/°Ð9JÓKò 	ˆJØ˜TÑ!ØØ�H‰H�ZÔ ØÓñ		ñùò Gùòùs   ‚(D(ªDÁD(ÁD#Á$CD(c              #  ó  K  — | j                  «       }|j                  |«       t        | |d«      } | –— t        |«      D ]E  }d|v r|j	                  dd«      \  }}n|}d }t        | ||«      }|sŒ1|j                  |«       |–— ŒG y ­w)NÚ ú?r   )rd   ÚdiscardÚgenerate_driver_urlÚlistÚsplitÚremove)r   rj   Úmain_driverÚdrvÚdriver_onlyÚ	query_strÚnew_urls          r   rh   rh   Á   s•   è ø€ Ø×%Ñ%Ó'€KØ×Ñ˜+Ô&ä
˜c ;°Ó
3€CØ
‚Iä�MÓ"ò ˆØ�#‰:Ø%(§Y¡Y¨s°AÓ%6Ñ"ˆK™ð ˆKØˆIä% c¨;¸	ÓBˆÚØ× Ñ  Ô%à‹Mñùs   ‚A.B	Á1B	c                óº   — |j                   j                  «       |j                   j                  |j                   j                  «       ¬«      j                  «       u S )zðReturn True if the engine's URL is on the "default" driver, or
    more generally the "preferred" driver to use for tests.

    Backends can override this to make a different driver the "prefeferred"
    driver that's not the default.

    ©Ú
drivername)r   Ú_get_entrypointra   r9   )r-   r7   s     r   Úis_preferred_driverr…   ×   sK   € ð 	�
‰
×"Ñ"Ó$Ø�:‰:�>‰>Ø—z‘z×2Ñ2Ó4ð ó 
ç
‰/Ó
ð	ðr   c                óÎ   — | j                  «       }| j                  |›d|›�¬«      }|r|j                  |«      }	 |j                  «        |S # t        j
                  $ r Y y w xY w)Nú+r‚   )r9   ra   Úupdate_query_stringrK   r	   ÚNoSuchModuleError)r   Údriverr   r:   r€   s        r   rx   rx   è   sr   € à×"Ñ"Ó$€Gà�g‰gÚ%¡vÐ.ð ó €Gñ Ø×-Ñ-¨iÓ8ˆðØ×ÑÔð ˆøô × Ñ ò Ùðús   ¼A ÁA$Á#A$c               #  ó"  K  — t        «       } t        j                  j                  «       D ]  }|j                  j                  «        Œ t        j                  j                  «       D ]f  }|j                  j                  }|j                  «       }||j                  |j                  |j                  f}|| vsŒR|–— | j                  |«       Œh t        j                  j                  «       D ]  }|j                  j                  «        Œ y ­wr   )ra   r   rS   Úall_configsr8   Údisposer   r9   ÚusernameÚhostÚdatabaserf   )Úhostsr-   r   r:   Ú	host_confs        r   rA   rA   ú   sÏ   è ø€ Ü‹E€Eä�}‰}×(Ñ(Ó*ò ˆØ�‰�‰Õðô �}‰}×(Ñ(Ó*ò !ˆØ�f‰f�j‰jˆØ×&Ñ&Ó(ˆØ˜cŸl™l¨C¯H©H°c·l±lÐCˆ	à˜EÒ!ØŠIØ�I‰I�iÕ ð!ô �}‰}×(Ñ(Ó*ò ˆØ�‰�‰Õñùs   ‚B7DÂ:ADc                 ó   — y r   r+   ©r-   r[   s     r   Ú"drop_all_schema_objects_pre_tablesr•     ó   € àr   c                 ó   — y r   r+   r”   s     r   Ú#drop_all_schema_objects_post_tablesr˜     r–   r   c                óà  — t        | |«       t        | |«       t        j                  j                  j
                  rt        | |«       t        |«      }d}t        j                  j                  j                  | «      r|| j                  | j                  fz  }t        j                  |||¬«       t        | |«       t        j                  j                  j                  | «      rü|j!                  «       5 }|j#                  «       D ]9  }|j%                  t'        j(                  t+        j,                  |«      «      «       Œ; t        j                  j                  j                  | «      rm| j                  | j                  fD ]R  }|j#                  |¬«      D ];  }|j%                  t'        j(                  t+        j,                  ||¬«      «      «       Œ= ŒT d d d «       y y # 1 sw Y   y xY w)Nr   )Úconsider_schemasr   )r•   Ú
drop_viewsr   ÚrequirementsÚmaterialized_viewsÚenabledÚdrop_materialized_viewsr
   ÚschemasÚenabled_for_configÚtest_schemaÚtest_schema_2r   Údrop_all_tablesr˜   Ú	sequencesÚbeginÚget_sequence_namesÚexecuter   ÚDropSequencer   ÚSequence)r-   r[   Ú	inspectorrš   ÚconnÚseqÚschema_names          r   Údrop_all_schema_objectsr¯     s—  € Ü& s¨CÔ0äˆs�CÔä×Ñ×-Ñ-×5Ò5Ü  SÔ)ä˜“€IàÐÜ×Ñ×"Ñ"×5Ñ5°cÔ:Ø˜SŸ_™_¨c×.?Ñ.?Ð@Ñ@ÐÜ×Ñ˜˜iÐ:JÕKä'¨¨SÔ1ä×Ñ×$Ñ$×7Ñ7¸Ô<Ø�Y‰Y‹[ð 	˜DØ ×3Ñ3Ó5ò E�Ø—‘œS×-Ñ-¬f¯o©o¸cÓ.BÓCÕDðEä×"Ñ"×*Ñ*×=Ñ=¸cÔBØ$'§O¡O°S×5FÑ5FÐ#Gò �KØ(×;Ñ;Ø*ð  <ó  ò ˜ð Ÿ™Ü×,Ñ,Ü &§¡°¸KÔ Hóõñð÷		ð 	ð =÷	ð 	ús   Ã7C#G$Ç$G-c                óú  — t        |«      }	 |j                  «       }|j                  «       5 }|D ]L  }|j                  t	        j
                  t        j                  |t        j                  «       «      «      «       ŒN 	 d d d «       t        j                  j                  j                  | «      r•	 |j                  | j                  ¬«      }|j                  «       5 }|D ]X  }|j                  t	        j
                  t        j                  |t        j                  «       | j                  ¬«      «      «       ŒZ 	 d d d «       y y # 1 sw Y   ŒÈxY w# t        $ r Y ŒÖw xY w# 1 sw Y   y xY w# t        $ r Y y w xY w)Nr   )r
   Úget_view_namesr¦   r¨   r   Ú	_DropViewr   ÚTableÚMetaDataÚNotImplementedErrorr   rœ   r    r¡   r¢   )r-   r[   r«   Ú
view_namesr¬   Úvnames         r   r›   r›   8  sJ  € Ü˜“€Ið	Ø×-Ñ-Ó/ˆ
ð �Y‰Y‹[ð 	˜DØ#ò �Ø—‘Ü—M‘M¤&§,¡,¨u´f·o±oÓ6GÓ"HÓIõñ÷	ô ×Ñ×"Ñ"×5Ñ5°cÔ:ð	Ø"×1Ñ1¸¿¹Ð1ÓIˆJð —‘“ð 
 Ø'ò 	�EØ—L‘LÜŸ™Ü"ŸL™LØ %Ü &§¡Ó 1Ø'*§¡ôóõñ	÷
ð 
ð ;÷	ð 	ûô ò Ùðú÷
ð 
ûô #ò 	Ùð	ús<   �E ­AEÂ2E. ÃAE"ÅEÅ	EÅEÅ"E+Å.	E:Å9E:c                óä  — t        |«      }|j                  «       }|j                  «       5 }|D ]  }|j                  d|› �«       Œ 	 d d d «       t        j
                  j                  j                  | «      r_|j                  | j                  ¬«      }|j                  «       5 }|D ]#  }|j                  d| j                  › d|› �«       Œ% 	 d d d «       y y # 1 sw Y   Œ’xY w# 1 sw Y   y xY w)NzDROP MATERIALIZED VIEW r   ú.)	r
   Úget_materialized_view_namesr¦   Úexec_driver_sqlr   rœ   r    r¡   r¢   )r-   r[   r«   Úmview_namesr¬   r·   s         r   rŸ   rŸ   Y  sú   € Ü˜“€Ià×7Ñ7Ó9€Kà	�‰‹ð D˜Ø ò 	DˆEØ× Ñ Ð#:¸5¸'Ð!BÕCñ	D÷Dô ×Ñ×"Ñ"×5Ñ5°cÔ:Ø×;Ñ;Ø—?‘?ð <ó 
ˆð �Y‰Y‹[ð 	˜DØ$ò �Ø×$Ñ$Ø-¨c¯o©oÐ->¸aÀ¸wÐGõñ÷	ð 	ð	 ;÷	Dð Dú÷	ð 	ús   ¬CÂ&)C&ÃC#Ã&C/c                ó2   — t        d|j                  ›�«      ‚)z—Dynamically create a database for testing.

    Used when a test run will employ multiple processes, e.g., when run
    via `tox` or `pytest -n4`.
    z no DB creation routine for cfg: ©rµ   r   ©r-   r[   rT   s      r   rD   rD   m  s   € õ Ø03·²Ð9óð r   c                ó2   — t        d|j                  ›�«      ‚)z8Drop a database that we dynamically created for testing.zno DB drop routine for cfg: r¾   r¿   s      r   r^   r^   y  s   € õ À#Ç'Â'ÐKÓ
LÐLr   c                ól   ‡ — t        j                  ‰ «      }t        |j                  «      dk(  r‰ S ˆ fd„S )Né   c                ó   •—  ‰| |«      S r   r+   )rV   rZ   Ú_optionsr"   s      €r   ú<lambda>z'_adapt_update_db_opts.<locals>.<lambda>„  s   ø€ ±°F¸GÓ1D€ r   )r   Úinspect_getfullargspecÚlenÚargs)r"   Úinsps   ` r   Ú_adapt_update_db_optsrÊ     s.   ø€ Ü×&Ñ& rÓ*€DÜ
ˆ4�9‰9ƒ~˜ÒØˆ	ãDÐDr   c                 ó   — y)zCSet database options (db_opts) for a test database that we created.Nr+   )rV   rZ   rW   s      r   rN   rN   ‡  ó   � r   c                 ó   — y)z–Perform extra steps after configuring the main engine for testing.

    (For the internal dialects, currently only used by sqlite, oracle, mssql)
    Nr+   )r   r7   rF   s      r   rP   rP   Œ  rÌ   r   c                 ó   — y)a	  perform extra steps after configuring any engine within the
    testing_engine() function.

    this includes the main engine as well as most ad-hoc testing engines.

    steps here should not get in the way of test cases that are looking
    for events, etc.

    Nr+   )r   r7   rW   rJ   s       r   Úpost_configure_testing_enginerÏ   ”  rÌ   r   c                óP   — t        j                  | «      } | j                  |¬«      S )zúCreate a connection URL for a dynamically-created test database.

    :param url: the connection URL specified when the test run was invoked
    :param ident: the pytest-xdist "worker identifier" to be used as the
                  database name
    )r�   )r4   r5   ra   ©r   rT   s     r   rM   rM   ¡  s#   € ô �/‰/˜#Ó
€CØ�7‰7˜Eˆ7Ó"Ð"r   c                 ó   — y)z@Create dialect-specific config settings for a follower database.Nr+   )r-   rT   s     r   rU   rU   ­  s   € ð 	r   c                 ó   — y)a[  Remove databases that were created during the test process, after the
    process has ended.

    This is an optional step that is invoked for certain backends that do not
    reliably release locks on the database as long as a process is still in
    use. For the internal dialects, this is currently only necessary for
    mssql and oracle.
    Nr+   rÑ   s     r   Úrun_reap_dbsrÔ   ³  rÌ   r   c                ó†  — t         j                  d«       t        j                  t        «      }t        j                  t        «      }i }t        | «      5 }|D ]©  }|j                  «       }|j                  d«      \  }}t        j                  |«      }||vr&|j                  «       ||<   ||   j                  «        |j                  «       |j                  f}	||	   j                  |«       ||	   j                  |«       Œ« 	 d d d «       |D ]$  }	t        ||	   «      d   }
||	   }t!        |
|«       Œ& y # 1 sw Y   Œ3xY w)NzReaping databases...ú r   )rB   rC   rb   rc   ra   ÚopenÚstriprz   r4   r5   rK   rL   r9   r�   rf   ry   rÔ   )Úidents_filerk   ÚidentsÚdialectsÚfile_ÚlineÚdb_namerV   rm   Úurl_keyr   rT   s               r   Úreap_dbsrà   ¿  s*  € Ü‡H�HÐ#Ô$ä×"Ñ"¤3Ó'€DÜ×$Ñ$¤SÓ)€FØ€Hä	ˆkÓ	ð 
)˜eØò 		)ˆDØ—:‘:“<ˆDØ"Ÿj™j¨›o‰OˆG�VÜ—o‘o fÓ-ˆGØ˜hÑ&Ø$+×$7Ñ$7Ó$9�˜Ñ!Ø˜Ñ!×3Ñ3Ô5Ø×/Ñ/Ó1°7·<±<Ð@ˆGØ�‰M×Ñ˜fÔ%Ø�7‰O×Ñ Õ(ñ		)÷
)ð ò !ˆÜ�4˜‘=Ó! !Ñ$ˆØ�w‘ˆÜ�S˜%Õ ñ!÷
)ð 
)ús   ÁB/D7Ä7E c                ó2   — t        d|j                  ›�«      ‚)aO  Specify keyword arguments for creating a temporary Table.

    Dialect-specific implementations of this method will return the
    kwargs that are passed to the Table method when creating a temporary
    table for testing, e.g., in the define_temp_tables method of the
    ComponentReflectionTest class in suite/test_reflection.py
    z,no temp table keyword args routine for cfg: r¾   r”   s     r   Útemp_table_keyword_argsrâ   Ø  s   € õ Ø<?¿GºGÐEóð r   c                 ó   — y r   r+   )r   Ú
connections     r   Úprepare_for_drop_tablesrå   æ  r–   r   c                 ó   — y r   r+   )r   r8   Útestclss      r   Ú stop_test_class_outside_fixturesrè   ë  r–   r   c                ó   — |S )a¸  Specify table name for creating a temporary Table.

    Dialect-specific implementations of this method will return the
    name to use when creating a temporary table for testing,
    e.g., in the define_temp_tables method of the
    ComponentReflectionTest class in suite/test_reflection.py

    Default to just the base name since that's what most dialects will
    use. The mssql dialect's implementation will need a "#" prepended.
    r+   )r-   r[   Ú	base_names      r   Úget_temp_table_namerë   ð  s
   € ð Ðr   c                óF   — t        d| j                  j                  ›�«      ‚)Nz7backend does not implement a schema name set function: ©rµ   r8   r   )r-   Údbapi_connectionr®   s      r   Ú set_default_schema_on_connectionrï   ÿ  s   € å
à�6‰6�:Š:ð	óð r   F)Ú
set_lambdaÚsort_by_parameter_orderc               óF   — t        d| j                  j                  › �«      ‚)a˜  return the backends insert..on conflict / on dupe etc. construct.

    while we should add a backend-neutral upsert construct as well, such as
    insert().upsert(), it's important that we continue to test the
    backend-specific insert() constructs since if we do implement
    insert().upsert(), that would be using a different codepath for the things
    we need to test like insertmanyvalues, etc.

    z3backend does not include an upsert implementation: rí   )r-   ÚtableÚ	returningrð   rñ   s        r   Úupsertrõ     s#   € ô Ø
=¸c¿f¹f¿j¹j¸\ÐJóð r   c                ó   — |S )zƒNormalize sequence parameters for dialect that don't start with 1
    by default.

    The default implementation does nothing
    r+   )r-   Úsequences     r   Únormalize_sequencerø     s	   € ð €Or   c                ó*   — t        j                  «       S r   )Ú
contextlibÚnullcontext)r-   s    r   Úallow_stale_update_implrü   #  s   € ä×!Ñ!Ó#Ð#r   c                óp   — t        t        j                  «      5   | |i |¤Žcddd«       S # 1 sw Y   yxY w)a  decorator around a test function that indicates the test will
    be UPDATING rows that have been read and are now stale.

    This normally doesn't require intervention except for mariadb 12
    which now raises its own error for that, and we want to turn off
    that setting just within the scope of the test that needs it
    to be turned off (i.e. ORM stale version tests)

    N)rü   r   Ú_current)r"   r.   r/   s      r   Úallow_stale_updatesrÿ   (  s0   € ô 
!¤§¡Ó	1ñ Ù�3ˆ~˜"‰~÷÷ ò ús   š,¬5c           
     ó  — t        |j                  dd«      }|r|j                  }t        | «      }t	        t        |j                  j                  «       «      D ��cg c]1  \  }}|�*|j                  |j                  |j                  ¬«      v r|‘Œ3 c}}«      D ]\  }|r9| j                  «       5  | j                  |j                  «       «       ddd«       Œ>| j                  |j                  «       «       Œ^ yc c}}w # 1 sw Y   ŒoxY w)zžan absolutely foolproof delete from all tables routine.

    dialects should override this to add special instructions like
    disable constraints etc.

    Ú
savepointsFNr   )Úgetattrrœ   rž   r
   Úreversedr   ÚtablesÚvaluesre   Úget_table_namesr   Úbegin_nestedr¨   Údelete)rä   r-   Úmetadatar  r«   ÚtÚfksró   s           r   Údelete_from_all_tablesr  7  sö   € ô ˜×)Ñ)¨<¸Ó?€JÙØ×'Ñ'ˆ
ä˜
Ó#€Iäô 8Ø—‘×&Ñ&Ó(ó÷		
á��Cð ˆ}ð —‘˜)×3Ñ3¸1¿8¹8Ð3ÓDÑDò ó		
óò /ˆñ Ø×(Ñ(Ó*ñ 3Ø×"Ñ" 5§<¡<£>Ô2÷3ð 3ð ×Ñ˜uŸ|™|›~Õ.ñ!/ùó		
÷3ð 3ús   Á6C:
Â/ D Ä D		)=Ú
__future__r   rb   rú   Úloggingru   r   r   r   r	   r
   r7   r   r   r   r4   r   r   Úsqlr   r   Ú	getLoggerr<   rB   ÚFOLLOWER_IDENTr   rG   r\   r_   rs   rh   r#   r…   rx   rA   r•   r˜   r¯   r›   rŸ   rD   r^   rÊ   r%   rN   rP   rÏ   rM   rU   rÔ   rà   râ   rå   rè   rë   rï   rõ   rø   rü   rÿ   r  r+   r   r   ú<module>r     s´  ðõ #ã Û Û å Ý Ý Ý Ý Ý Ý Ý "Ý 0Ý Ý Ý ð €g×Ñ˜Ó!€à€÷'2ñ '2òT/òò>-òGòTð, 
‡�ñó ðð  
‡�ñó ðò"ð& 
‡�ñ	ó ð	ð 
‡�ñ	ó ð	òòBòBð( 
‡�ñó ðð 
‡�ñMó ðMò
Eð 
×ÑÐ.Ó/ñNó 0ðNð 
‡�ñó ðð 
‡�ñ	ó ð	ð 
‡�ñ#ó ð#ð 
‡�ñ	ó ð	ð
 
‡�ñó ðò!ð2 
‡�ñ
ó ð
ð 
‡�ñ	ó ð	ð 
‡�ñ	ó ð	ð 
‡�ñó ðð 
‡�ñó ðð 
‡�à)-Àuóó ðð" 
‡�ñó ðð 
‡�ñ$ó ð$ð ñó ðð 
‡�ñ/ó ñ/r   