
    LpjW              
          S SK Jr  S SKrS SKJr  S SKJrJrJr  S SK	J
r
  S SKJrJr  S SKJrJr  \(       a  S SKJrJr  S S	KJr   " S
 S\
\\\4   \\\\\4   5      rg)    )annotationsNreduce)TYPE_CHECKINGAnyProtocol)LazyNamespace)NativeExprTNativeFrameT)SQLExprTSQLLazyFrameT)IterableSequence)PythonLiteralc                      \ rS rSrSS jrSS jr S       SS jjrSS jrSS jrSS jr	SS	 jr
SS
 jrSS jrSS jr S       SS jjrSrg)SQLNamespace   c                    g N )selfnameargss      S/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/narwhals/_sql/namespace.py	_functionSQLNamespace._function   s    WZ    c                    g r   r   )r   values     r   _litSQLNamespace._lit   s    sr   Nc                    g r   r   )r   	conditionr   	otherwises       r   _whenSQLNamespace._when   s    
 r   c                    g r   r   )r   exprss     r   	_coalesceSQLNamespace._coalesce   s    Sr   c               R   ^ ^ SUU 4S jjnT R                   R                  " U/UQ76 $ )Nc                ^   > T(       a  U4S jU  5       n [        [        R                  U 5      $ )Nc              3  f   >#    U  H&  nTR                  UTR                  S 5      5      v   M(     g7f)FNr)   r    .0colr   s     r   	<genexpr><SQLNamespace.any_horizontal.<locals>.func.<locals>.<genexpr>#   s(     N#sDIIe,<==   .1)r   operatoror_colsignore_nullsr   s    r   func)SQLNamespace.any_horizontal.<locals>.func!   s!    NN(,,--r   r8   zIterable[NativeExprT]returnr
   _expr_from_elementwise_horizontal_opr   r9   r(   r:   s   ``  r   any_horizontalSQLNamespace.any_horizontal    s)    	. 	.
 zz99$GGGr   c               R   ^ ^ SUU 4S jjnT R                   R                  " U/UQ76 $ )Nc                ^   > T(       a  U4S jU  5       n [        [        R                  U 5      $ )Nc              3  f   >#    U  H&  nTR                  UTR                  S 5      5      v   M(     g7f)TNr.   r/   s     r   r2   <SQLNamespace.all_horizontal.<locals>.func.<locals>.<genexpr>+   s'     MsDIIdO<<r4   )r   r5   and_r7   s    r   r:   )SQLNamespace.all_horizontal.<locals>.func)   s!    MM(--..r   r<   r>   rA   s   ``  r   all_horizontalSQLNamespace.all_horizontal(   s)    	/ 	/
 zz99$GGGr   c                N   ^  SU 4S jjnT R                   R                  " U/UQ76 $ )Nc                *   > TR                   " S/U Q76 $ )Ngreatestr   r8   r   s    r   r:   )SQLNamespace.max_horizontal.<locals>.func1   s    >>*4t44r   r<   r>   r   r(   r:   s   `  r   max_horizontalSQLNamespace.max_horizontal0   s$    	5 zz99$GGGr   c                N   ^  SU 4S jjnT R                   R                  " U/UQ76 $ )Nc                *   > TR                   " S/U Q76 $ )NleastrO   rP   s    r   r:   )SQLNamespace.min_horizontal.<locals>.func7   s    >>'1D11r   r<   r>   rR   s   `  r   min_horizontalSQLNamespace.min_horizontal6   s$    	2 zz99$GGGr   c                N   ^  SU 4S jjnT R                   R                  " U/UQ76 $ )Nc                8   > [        U4S jU4S jU  5       5      $ )Nc                (   > TR                  SX5      $ )NaddrO   )xyr   s     r   <lambda>;SQLNamespace.sum_horizontal.<locals>.func.<locals>.<lambda>?   s    T^^E18r   c              3  f   >#    U  H&  nTR                  UTR                  S 5      5      v   M(     g7f)r   Nr.   r/   s     r   r2   <SQLNamespace.sum_horizontal.<locals>.func.<locals>.<genexpr>@   s'     CdsTYYq\22dr4   r   rP   s    r   r:   )SQLNamespace.sum_horizontal.<locals>.func=   s    8CdC r   r<   r>   rR   s   `  r   sum_horizontalSQLNamespace.sum_horizontal<   s$    	 zz99$GGGr   c                N   ^  SU 4S jjnT R                   R                  " U/UQ76 $ )Nc                "   > TR                   " U 6 $ r   )r)   rP   s    r   r:   #SQLNamespace.coalesce.<locals>.funcG   s    >>4((r   r<   r>   rR   s   `  r   coalesceSQLNamespace.coalesceF   s$    	) zz99$GGGr   c                   ^  SU 4S jjnSU 4S jjnUc  T R                   R                  XBU5      $ T R                   R                  XRX5      $ )Nc                4   > TR                  U S   U S   5      $ )N   r   r%   rP   s    r   r:   $SQLNamespace.when_then.<locals>.funcO   s    ::d1gtAw//r   c                <   > TR                  U S   U S   U S   5      $ )Nro   r      rp   rP   s    r   func_with_otherwise3SQLNamespace.when_then.<locals>.func_with_otherwiseR   s"    ::d1gtAwQ88r   )r8   zSequence[NativeExprT]r=   r
   r>   )r   	predicatethenr$   r:   rt   s   `     r   	when_thenSQLNamespace.when_thenL   sH    	0	9 ::==d)TTzz99y
 	
r   r   )r   strr   zNativeExprT | PythonLiteralr=   r
   )r   r   r=   r
   r   )r#   r
   r   r
   r$   zNativeExprT | Noner=   r
   )r(   r
   r=   r
   )r(   r   r9   boolr=   r   )r(   r   r=   r   )rv   r   rw   r   r$   zSQLExprT | Noner=   r   )__name__
__module____qualname____firstlineno__r   r    r%   r)   rB   rJ   rS   rY   rf   rk   rx   __static_attributes__r   r   r   r   r      s     [2
 )-	  &	
 
 AHHHHHH QU
!
)1
>M
	
 
r   r   )
__future__r   r5   	functoolsr   typingr   r   r   narwhals._compliantr	   narwhals._compliant.typingr
   r   narwhals._sql.typingr   r   collections.abcr   r   narwhals.typingr   r   r   r   r   <module>r      sR    "   / / - @ 82-H
-<78]HlK?@H
r   