
    gFL                       S SK Jr  S SKrS SKrS SKJr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SKJ
r
  S S	KJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ r   S SK!J"r"  S SK#J$r$  S SK#J%r%  S SK#J&r&  S SK#J'r'  S SK#J(r(  S S K)J*r*  S S!K+J,r,  \(       aZ  S S"KJ-r-  S S#KJ.r.  S S$KJ/r/  S S%KJ0r0  S S&KJ1r1  S S'KJ2r2  S S(K3J4r4  S S)K!J5r5  S S*K6J7r7  S S+K8J9r9  S S,K#J:r:  S S-K;J<r<  S S.K;J=r=  S S/K>J?r?  S S0K>J@r@  \" S1\S2   S39rA " S4 S5\5      rBSS6 jrC\D" \R                  " S7\5       V s/ s H  n \C" U 5      PM     sn 5      rF\FS8:  rG\FS9:  rH\FS::  rI\FS;:  rJ\FS<:  rK\rL S S=KMJNrN   " S> S?5      rP\(       a        SS@ jrQOS SAKRJQrQ   S SBKJSrS  SCrT\FSD:  rU S SHKJVrV  \W" \V\"5      rX S     SSI jjrYSCrZ\K(       a  S SLK!J[r[  OS SMK\J]r[  \S\^\[4   r_\\^\[4   r`    SSN jra    SSO jrb    SSP jrcSQrd\R                      SSR j5       rfSSS jrg    SST jrh    SSU jri    SSV jrjSSW jrkSSX jrlSSY jrm    SSZ jrnSS[ jro        SS\ jrpS] rqS^ rrSS_ jrsSS` jrtSSa jruSb rvSSc jrwSd rx\y" \R                  Se5      (       a  Sf r{Sg r|OSh r{Si r|SSj jr}SSk jr~SSl jrSm r      SSn jr      SSo jrSSp jr " Sq Sr\Rt                  5      r\Q" \5            SSs j5       r " St Su\$5      r\Q" \5            SSv j5       rSSw jr      SSx jr      SSy jrSSz jrS{ rSS| jr\H(       a  S S}KJr  S S~KJr  \rOS SKJr  S rSS jrSS jrSS jrgs  sn f ! \O a
    S S=K#JNrN   GNf = f! \O a    \(       d   " SE SF\P5      rSSGrTSGrU GNf = f! \O a    \(       d   " SJ SK\P5      rVSGrZ GNf = f)    )annotationsN)Any)Callable)Dict)Iterable)Iterator)Mapping)Optional)Protocol)Set)Type)TYPE_CHECKING)TypeVar)Union)__version__)inspectschema)sql)types)url)CheckConstraint)Column)ForeignKeyConstraint)visitors)DialectKWArgs)BindParameter)ColumnClause)quoted_name)
TextClause)UnaryExpression)traverse)	TypeGuard)ClauseElement)Index)Table)
Connection)Dialect)Transaction)	Inspector)ColumnCollection)SQLCompiler)Insert)ColumnElement)
Constraint)
SchemaItem)Select)TableClause_CE)zColumnElement[Any]r0   )boundc                      \ rS rSrSS jrSrg)_CompilerProtocol=   c                    g N )selfelementcompilerkws       `/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/alembic/util/sqla_compat.py__call___CompilerProtocol.__call__>   s    s    r:   N)r<   r   r=   r   r>   r   returnstr)__name__
__module____qualname____firstlineno__r@   __static_attributes__r:   rB   r?   r6   r6   =   s    JrB   r6   c                ,     [        U 5      $ !   U s $ = fr9   )int)values    r?   	_safe_intrM   A   s    5zs   
 z(\d+|[abc]\d))      )rN      )rN   rP      )rN   rP      )   )
_NONE_NAMEc                      \ rS rSrSrSrg)_UnsupportedY   z.Placeholder for unsupported SQLAlchemy classesr:   N)rE   rF   rG   rH   __doc__rI   r:   rB   r?   rV   rV   Y   s    4rB   rV   c                    g r9   r:   )r<   dialectss     r?   compilesr[   _   s    ;>rB   )r[   )ComputedT)rN   rO      c                      \ rS rSrSrg)r\   k   r:   NrE   rF   rG   rH   rI   r:   rB   r?   r\   r\   k       rB   r\   F)Identityc                   U c  0 $ [         (       aK  U R                  5       nU(       a2  [        U [        5      (       d   eUR	                  U R
                  5        U$ 0 n[        U [        5      (       a+  U R                  US'   U R                  b  U R                  US'   SnUR	                  U Vs0 s H  n[        XS 5      c  M  U[        XS 5      _M!     sn5        U$ s  snf )Nalwayson_null)	start	incrementminvaluemaxvalue
nominvalue
nomaxvaluecyclecacheorder)
identity_has_dialect_kwargs_as_dict
isinstancer   updatedialect_kwargsrb   rd   re   getattr)identityrs   as_dictattrskeys        r?   _get_identity_options_dictry      s     I(('')G!(M::::x6676 3 G(H--$,OO!##/)1)9)9GI&
E NN  %$xd3 6C55$ s   /CCc                      \ rS rSrSrg)rb   y   r:   Nr`   r:   rB   r?   rb   rb   y   ra   rB   rb   )	_NoneName)symbolc                L    U [         L =(       d    [        U [        [        45      $ r9   )rT   rq   rD   r|   names    r?   constraint_name_definedr      s      :CD3	2B!CCrB   c                "    [        U [        5      $ r9   )rq   rD   r   s    r?   constraint_name_stringr      s     dC  rB   c                *    [        U 5      (       a  U $ S $ r9   )r   r   s    r?   constraint_name_or_noner      s     *$//49T9rB   autoc              #     #     U R                   nUc  S v   g U" 5       (       d#  U c   eU R                  5          S v   S S S 5        g S v   g ! [         a    S n NJf = f! , (       d  f       g = f7fr9   )in_transactionAttributeErrorbegin
connectionr   s     r?   _ensure_scope_for_ddlr      sr     #22 )))!!# $#    $#s=   A/A )A/AA/AA/AA/
A,(A/c                X    [         (       a  U R                  " US9$ U R                  " US9$ )N)hide_password)sqla_14render_as_string__to_string__)r   r   s     r?   url_render_as_stringr      s)    w##-@@  }==rB   c                J    [        U 5      nU(       a  U$ U R                  5       $ r9   )_get_connection_transactionr   r   transactions     r?   "_safe_begin_connection_transactionr      s&     .j9K!!rB   c                J    [        U 5      nU(       a  UR                  5         g g r9   )r   commitr   s     r?   #_safe_commit_connection_transactionr      s"     .j9K rB   c                J    [        U 5      nU(       a  UR                  5         g g r9   )r   rollbackr   s     r?   %_safe_rollback_connection_transactionr      s"     .j9K rB   c                J     U R                   nU" 5       $ ! [         a     gf = f)NF)r   r   r   s     r?   _get_connection_in_transactionr     s1     #22
 	  s    
""c                    U R                   $ r9   )expressions)idxs    r?   _idx_table_bound_expressionsr     s    ??rB   c                l    [        U S5      (       a  U R                  " S0 UD6$ U R                  " S0 UD6$ )N_copyr:   )hasattrr   copy)schema_itemr>   s     r?   r   r     s7    {G$$  &2&&%"%%rB   c                h    [         (       a  U R                  5       $ U R                  nUR                  $ r9   )r   get_transaction_root_Connection__transaction)r   rs     r?   r   r     s/     w))++)))rB   c                     [        [        R                  S5      (       a   [        R                  R                  " U 0 UD6$ [        R                  " U 0 UD6$ )Ncreate)r   r   URLr   )argr>   s     r?   _create_urlr      s?    sww!!ww~~s)b))ww"r""rB   c                    [         (       a  [        U 5      R                  X5      $ U R                  R                  XU5      $ r9   )r   r   	has_tabledialect)connectable	tablename
schemanames      r?   _connectable_has_tabler   '  s=     w{#--iDD"",,J
 	
rB   c                    [         (       a+  U R                  5        nUR                  X5      sS S S 5        $ U R                  R                  X5      $ ! , (       d  f       g = fr9   )r   _operation_contextexecutebind)	inspector	statementparamsconns       r?   _exec_on_inspectorr   2  sI    w))+t<<	2 ,+ ~~%%i88 ,+s   A
A c                l    [         (       d  U R                  $ SSKJn  U R                  UR
                  L $ )Nr   r   )r   nullablesqlalchemy.sqlr   _user_defined_nullableNULL_UNSPECIFIED)metadata_columnr   s     r?   _nullability_might_be_unsetr   :  s1    7''') 22f6M6MM	
rB   c                 >    [         (       d  g[        S U  5       5      $ )NFc              3  B   #    U  H  n[        U[        5      v   M     g 7fr9   )rq   r\   .0sds     r?   	<genexpr>._server_default_is_computed.<locals>.<genexpr>I       En:b(++n   )has_computedanyserver_defaults    r?   _server_default_is_computedr   E  s    <EnEEErB   c                 >    [         (       d  g[        S U  5       5      $ )NFc              3  B   #    U  H  n[        U[        5      v   M     g 7fr9   )rq   rb   r   s     r?   r   ._server_default_is_identity.<locals>.<genexpr>P  r   r   )r   r   r   s    r?   _server_default_is_identityr   L  s    7EnEEErB   c                j    [        U [        5      (       a  U R                  nUc   eU$ U R                  $ r9   )rq   r   parenttable)
constraintr   s     r?   _table_for_constraintr   S  s8    *233!!   rB   c                    [        U [        5      (       a&  U R                   Vs/ s H  oR                  PM     sn$ [        U [        5      (       a  [        U R                  5      $ [        U R                  5      $ s  snf r9   )	rq   r   elementsr   r   _find_columnssqltextlistcolumns)r   fks     r?   _columns_for_constraintr   \  sc    *233$.$7$78$7b		$788	J	0	0Z//00J&&''	 9s   A;c                `    [         (       a  U R                  US 5      $ U R                  US 5      $ r9   )r   reflect_tablereflecttable)r   r   s     r?   _reflect_tabler   e  s2    w&&ud33%%4
 	
rB   c                x    [        U 5      (       a)  [        U 5      u  p#UR                  UR                  U5      $ U $ r9   )_type_has_variants_get_variant_mappinggetr   )type_r   	base_typemappings       r?   _resolve_for_variantr   n  s4    %  1%8	{{7<<33rB   _variant_mappingc                ,    [        U R                  5      $ r9   )boolr   r   s    r?   r   r   x  s    E**++rB   c                    X R                   4$ r9   )r   r   s    r?   r   r   {  s    ,,,,rB   c                8    [        U 5      [        R                  L $ r9   )typesqltypesVariantr   s    r?   r   r     s    E{h....rB   c                2    U R                   U R                  4$ r9   )implr   r   s    r?   r   r     s    zz5==((rB   c           
        [         (       a?  U R                  c   eU R                  c   e[        U R                  [
        5      (       d   eU R                   Vs/ s H  oR                  U   R                  PM     nnU R                  R                  nU R                  R                  nU R                  S   R                  R                  R                  nU R                  S   R                  R                  R                  nU R                   Vs/ s H  owR                  R                  PM     nnU R                  n	U R                  n
U R                  nU R                  nUUUUUUU
U	UU4
$ s  snf s  snf )Nr   )r   r   r   rq   r   r&   column_keysr   r   columnr   ondeleteonupdate
deferrable	initially)r   rx   source_columnssource_tablesource_schematarget_schematarget_tabler<   target_columnsr  r  r  r  s                r?   _fk_specr    sc   }!!---""...*++U3333 1;0F0F0F3$$0F   $$))L%%,,M''*1177>>M&&q)0066;;L9C9L9LM9Lgnn))9LNM""H""H&&J$$I  Ns   "E.E3c                    U R                   S   R                  5       nUR                  S5      nUR                  S5        SR	                  U5      nU R
                  c   eX0R
                  R                  :H  $ )Nr   .)r   _get_colspecsplitpopjoinr   rx   )r   spectokenstablekeys       r?   _fk_is_self_referentialr    sh    q!..0DZZ_F
JJrNxxH(((((,,,,rB   c                    U R                   $ r9   )_type_bound)r   s    r?   _is_type_boundr    s     !!!rB   c                L    [        5       n[        U 0 SUR                  05        U$ )z2locate Column objects within the given expression.r  )setr"   add)clausecolss     r?   r   r     s%     %(EDVR(DHH-.KrB   c                    UR                   c   eXR                      n[        U S5      (       d  [        U S5      (       a  U R                  R                  U5        gU R                  U5        g)z(remove a column from a ColumnCollection.N
_immutable	_readonly)rx   r   _parentremove)
collectionr  	to_removes      r?   _remove_column_from_collectionr)    s]     ::!!!::&I z<((GJ,L,L!!),)$rB   c                   [        U[        5      (       a-  [        U[        R                  5      nU R                  U5        U$ [        U[        5      (       a  [        X5      $ [        U[        5      (       a  [        XR                  5      $ [        U[        R                  5      (       a  [        X5      $ [        S5      e)zAa workaround for the Index construct's severe lack of flexibilityz#String or text() construct expected)rq   rD   r   r   NULLTYPEappend_columnr    _textual_index_element_textual_index_columntextr   r.   _copy_expression
ValueError)r   text_cs      r?   r.  r.    s     %5(++,A	E:	&	&%e33	E1	2	2$UJJ77	E3,,	-	--->??rB   c                @   ^ U4S jn[         R                  " U 0 U5      $ )Nc                
  > [        U [        5      (       am  U R                  b`  U R                  TLaQ  U R                  TR                  ;   a  TR                  U R                     $ [        U 5      nTR                  U5        U$ g r9   )rq   r   r   r   r3  r   r,  )colr3  r  s     r?   replace!_copy_expression.<locals>.replace  sh    sF##		%		-xx<>>)#~~chh//#J**1-rB   )r   replacement_traverse)
expressionr  r7  s    ` r?   r0  r0    s$     ((B rB   c                  ,    \ rS rSrSrSrSS jrS rSrg)	r-  i  a)  Wrap around a sqlalchemy text() construct in such a way that
we appear like a column-oriented SQL expression to an Index
construct.

The issue here is that currently the Postgresql dialect, the biggest
recipient of functional indexes, keys all the index expressions to
the corresponding column expressions when rendering CREATE INDEX,
so the Index we create here needs to have a .columns collection that
is the same length as the .expressions collection.  Ultimately
SQLAlchemy should support text() expressions in indexes.

See SQLAlchemy issue 3174.

_textual_idx_elementc                    Xl         X l        UR                  U l        [        R                  " U R                  R                  [
        R                  5      U l        UR                  U R                  5        g r9   )	r   r/  rx   r   r   r   r+  fake_columnr,  )r;   r   r/  s      r?   __init___textual_index_element.__init__  sL    
	99!==9J9JKD,,-rB   c                    U R                   /$ r9   )r>  )r;   r>   s     r?   get_children#_textual_index_element.get_children  s      !!rB   )r>  rx   r   r/  N)r   r&   r/  r    rC   None)	rE   rF   rG   rH   rX   __visit_name__r?  rB  rI   r:   rB   r?   r-  r-    s     ,N."rB   r-  c                <    UR                   " U R                  40 UD6$ r9   )processr/  r<   r=   r>   s      r?   _render_textual_index_columnrI    s     GLL/B//rB   c                      \ rS rSrSrg)_literal_bindparami  r:   Nr`   r:   rB   r?   rK  rK    s    rB   rK  c                (    UR                   " U 40 UD6$ r9   )render_literal_bindparamrH  s      r?   _render_literal_bindparamrN  !  s     ,,W;;;rB   c                4    [         (       a  U R                  $ 0 $ r9   )sqla_13kwargs)r6  s    r?   _column_kwargsrR  (  s    wzz	rB   c                   U R                   c  g Uc   e[        (       a  UR                  R                  U SS9$ [	        U R                   S5      (       a  [        U R                   5      nO[        nU" [        U R                   5      SS9nU R                  US9n [        U [        R                  5      (       a#  UR                  US 5      nUR                  U 5      $ UR                  R                  U 5      $ )NF_alembic_quotequote)rV  r   )r   r   identifier_preparerformat_constraintr   r   r   rD   	__class__rq   r   r%   ddl_compiler_prepared_index_name)r   r   quoted_name_clsnew_nameds        r?   _get_constraint_final_namer_  /  s     w **<<u = 
 	
 :??G,, %)$9O)O"3z#7uE))x)8
j&,,//$$Wd3A))*55 ..@@LLrB   c                    [         (       a1  U R                  c  gUc   eUR                  R                  U SS9nUS L$ U R                  S L$ )NFrT  )r   r   rW  rX  )r   r   r   s      r?   _constraint_is_namedra  T  s^     w??""""**<<u = 
 4d**rB   c                    [         (       a  U R                  $ [        U R                  =(       a    U R                  5      $ r9   )r   
is_mariadbr   server_version_info_is_mariadbmysql_dialects    r?   re  re  c  s7    w'''-- *))
 	
rB   c                    U R                   $ r9   ) _mariadb_normalized_version_inforf  s    r?   ri  ri  m  s    999rB   c                r    [         (       a  U R                  5       R                  5       $ U R                  SS9$ )NT)inline)r   insertrk  )r   s    r?   _insert_inlinerm  q  s-    w||~$$&&||4|((rB   )create_mock_engine)selectcreate_enginec                    [        SSUS9$ )Nzpostgresql://mock)strategyexecutorrp  )r   ru  r>   s      r?   rn  rn    s    fx
 	
rB   c                 B    [         R                  " [        U 5      40 UD6$ r9   )r   ro  r   )r   r>   s     r?   _selectrw    s    zz$w-.2..rB   c                N    U R                    H  n[        U5      (       d  M    g   gNTF)r   is_expression)indexexprs     r?   is_expression_indexr}    s%    !! " rB   c                    [        U [        5      (       a#  U R                  n [        U [        5      (       a  M#  [        U [        5      (       a  U R                  (       a  ggry  )rq   r!   r<   r   
is_literal)r|  s    r?   rz  rz    s@    
T?
+
+|| T?
+
+dL))T__rB   )rL   rD   rC   zUnion[int, str])r<   zType[ClauseElement]rZ   rD   rC   z0Callable[[_CompilerProtocol], _CompilerProtocol])F)ru   z&Union[Identity, schema.Sequence, None]rs   r   rC   zDict[str, Any])r   _ConstraintNamerC   z!TypeGuard[_ConstraintNameDefined])r   r  rC   zTypeGuard[str])r   r  rC   Optional[str])r   Optional[Connection]rC   zIterator[None])T)r   r'   rC   r)   )r   r'   rC   rD  )r   r  rC   r   )r   r%   rC   zIterable[ColumnElement[Any]])r   r3   rC   r3   )r   r'   rC   zOptional[Transaction])rC   zurl.URL)r   r'   r   rD   r   zUnion[str, None]rC   r   )rC   r   )r   r/   rC   r&   )r   r*   r   r&   rC   rD  )r   r   rC   r   )r   r   rC   r   )r   r/   rC   r   )r'  r+   r  z%Union[Column[Any], ColumnClause[Any]]rC   rD  )r   r&   r2  z*Union[str, TextClause, ColumnElement[Any]]rC   z&Union[ColumnElement[Any], Column[Any]])r:  r3   r  r&   rC   r3   )r<   r-  r=   r,   rC   rD   )r<   rK  r=   r,   rC   rD   )r6  r   rC   r	   )r   zUnion[Index, Constraint]r   Optional[Dialect]rC   r  )r   zUnion[Constraint, Index]r   r  rC   r   )rg  r(   rC   r   )r   zUnion[TableClause, Table]rC   r-   )rC   r1   )r{  r%   rC   r   )r|  r   rC   r   )
__future__r   
contextlibretypingr   r   r   r   r   r	   r
   r   r   r   r   r   r   
sqlalchemyr   r   r   r   r   r   sqlalchemy.enginer   sqlalchemy.schemar   r   r   r   r   sqlalchemy.sql.baser   sqlalchemy.sql.elementsr   r   r   r    r!   sqlalchemy.sql.visitorsr"   typing_extensionsr#   r$   r%   r&   r'   r(   r)   sqlalchemy.engine.reflectionr*   r+   sqlalchemy.sql.compilerr,   sqlalchemy.sql.dmlr-   r.   sqlalchemy.sql.schemar/   r0   sqlalchemy.sql.selectabler1   r2   r3   r6   rM   tuplefindall_versrP  r   
sqla_14_18
sqla_14_26sqla_2sqlalchemy_versionsqlalchemy.sql.namingrT   ImportErrorrV   r[   sqlalchemy.ext.compilerr\   r   has_computed_reflectionrb   
issubclassro   ry   has_identityr|   sqlalchemy.utilr}   rD   r  _ConstraintNameDefinedr   r   r   AUTOINCREMENT_DEFAULTcontextmanagerr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   
TypeEnginer   r   r  r  r  r   r)  r.  r0  r-  rI  rK  rN  rR  r_  ra  re  ri  rm  rn  ro  
_sa_selectrw  rq  r}  rz  )xs   0r?   <module>r     s   #  	               "    ( ! - $ 2 # - 1 0 / . 3 , '(  ,)-643)50005e5!CDEK K 	::&6DEDaYq\DE	 6/
6/j 
j 
	$  A>
5 5 ?$?14?	9?
 12/ L#z13/ #-X}"E  %%8%% 
%N L	-3 c9,-sI~. D
D&D!
!!:
::   $ ,>"""		 &***#

(+
9I
	
9
FF (
 8 233,-
/)B-"% %*O%	%$@@C@+@$*"S.. ": 

 !0#0/:00 "0	 	 

<<+6<< <"M("M3D"M"MJ+(+3D+	+
:) - 0G(

/S F  A@@A&  $	| 	 L#$  	| 	 Ls<   NN" :N5 O "N21N25OOO65O6