o
    "i0                     @  s  U d dl m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 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rjd 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- dd'l.m/Z/ dd(l.m0Z0 dd)l.m1Z1 dd*l.m2Z2 dd+l.m3Z3 dd,l.m4Z4 dd-l5m6Z6 dd.lm7Z7 dd/l8m9Z9 dd0l:m;Z; dd1l:m<Z< dd2l:m=Z= dd3l:m>Z> dd4l:m?Z? dd5l:m@Z@ dd6l:mAZA dd7l:mBZB dd8l:mCZC dd9l:mDZD dd:l:mEZE dd;lFmGZG dd<lFmHZH dd=lImJZJ dd>lmKZK ed?ed@ZLedAedBdCZMedDdEd@ZNedFdGd@ZOG dHdI dIeeeM ZPG dJdK dKeZQedLeReSdMdNdOdPdQeTdR
ZUedSejVedT ee eePe  ePe ZWeeSdUdVePeL ejXeL f ZYeejZeL ejVdWedT eeL eePeL  ePeL f Z[	 eejZeL dWeeL f Z\edXeedYf d@Z]edZed@Z^ed[ed@Z_ed\ed@Z`ed]ed@Zaed^ed@Zbed_ed@Zced`ed@Zdedaed@Zeedbed@Zfedced@ZgedVePeL dWejXeL eg dVf ddf Zh	 eheL Zideejdf< 	 eeeheL f ZkeeSeheL f Zleeele  ele f Zm	 eeef Zn	 eej7ee eePe  ePe f Zo	 eeoejpf Zq	 eehe ejrf Zs	 edgejtf Zu	 eeSePe ejvdhf Zw	 ediewd@Zxe	exef ZyeeSdjejzf Z{	 edkdldmdnee eePe  ePe f Z|ej}eSef Z~eedo dof ZedEedE f ZeeReheR df Zeeedp f ZerIddudvZddxdyZdd}d~ZdddZdddZdddZdddZdddZdddZdddZdddZdddZdddZdddZdddZnKedZedZedZedZedZedZedZedZedZedZedZedZedZedZedZdddZdddZdddZdddZdddĄZdddʄZedddτZedddτZedddτZdddτZedddڄZedddڄZedddڄZedddڄZdddڄZdS )    )annotationsN)Any)Callable)Dict)Generic)Iterable)Mapping)NoReturn)Optional)overload)Set)Tuple)Type)TYPE_CHECKING)TypeVar)Union   )roles   )exc)util)Inspectable)Literal)Protocol)	TypeAlias)date)datetime)time)	timedelta)Decimal)UUID)
Executable)Compiled)DDLCompiler)SQLCompiler)
UpdateBase)
ValuesBase)ClauseElement)ColumnElement)KeyedColumnElement)quoted_name)SQLCoreOperations)
TextClause)LambdaElement)FromClauseRole)Column)Alias)CTE)
FromClause)Join)NamedFromClause)ReturnsRows)Select)
Selectable)
SelectBase)Subquery)TableClause)TableValueType)	TupleType)
TypeEngine)	TypeGuard_T)bound_T_coT)r@   	covariant_CEzColumnElement[Any]_CLEr'   c                   @  s   e Zd ZdZdddZdS )_HasClauseElementz8indicates a class that has a __clause_element__() methodreturn"roles.ExpressionElementRole[_T_co]c                 C     d S N )selfrJ   rJ   Z/var/www/html/voicebot/backend/venv/lib/python3.10/site-packages/sqlalchemy/sql/_typing.py__clause_element__V       z$_HasClauseElement.__clause_element__N)rF   rG   )__name__
__module____qualname____doc__rM   rJ   rJ   rJ   rL   rE   S       rE   c                   @  s   e Zd ZdZdddZdS )	_CoreAdapterProtoz?protocol for the ClauseAdapter/ColumnAdapter.traverse() method.objrC   rF   c                 C  rH   rI   rJ   )rK   rU   rJ   rJ   rL   __call__\   rN   z_CoreAdapterProto.__call__N)rU   rC   rF   rC   )rO   rP   rQ   rR   rV   rJ   rJ   rJ   rL   rT   Y   rS   rT   _NOT_ENTITYr   r   r   r   r    r   _MAYBE_ENTITY)*r   r,   zColumnElement[_T]zSQLCoreOperations[_T]_TP._T0_T1_T2_T3_T4_T5_T6_T7_T8_T9r-   r   ColumnExpressionArgumentr8   zSQLCoreOperations[Any]_DMLKeyzColumn[Any]r:   r3   r0   r1   zTypeEngine[_T])auto	ignore_fkcr"   rF   TypeGuard[SQLCompiler]c                 C  rH   rI   rJ   ri   rJ   rJ   rL   is_sql_compiler!  rN   rl   TypeGuard[DDLCompiler]c                 C  rH   rI   rJ   rk   rJ   rJ   rL   is_ddl_compiler#  rN   rn   tr.   TypeGuard[NamedFromClause]c                 C  rH   rI   rJ   ro   rJ   rJ   rL   is_named_from_clause%     rr   TypeGuard[ColumnElement[Any]]c                 C  rH   rI   rJ   rk   rJ   rJ   rL   is_column_element)  rs   ru   "TypeGuard[KeyedColumnElement[Any]]c                 C  rH   rI   rJ   rk   rJ   rJ   rL   is_keyed_column_element-  rs   rw   TypeGuard[TextClause]c                 C  rH   rI   rJ   rk   rJ   rJ   rL   is_text_clause1  rN   ry   TypeGuard[FromClause]c                 C  rH   rI   rJ   rk   rJ   rJ   rL   is_from_clause3  rN   r{   TypeEngine[Any]TypeGuard[TupleType]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_tuple_type5  rN   r~   TypeGuard[TableValueType]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_table_value_type7  rs   r   r   TypeGuard[Selectable]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_selectable;  rN   r   Union[Executable, ReturnsRows]TypeGuard[SelectBase]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_select_base=  rs   r   TypeGuard[Select[Any]]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_select_statementA  rs   r   r2   TypeGuard[TableClause]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_tableE  rN   r   TypeGuard[Subquery]c                 C  rH   rI   rJ   rq   rJ   rJ   rL   is_subqueryG  rN   r   TypeGuard[UpdateBase]c                 C  rH   rI   rJ   rk   rJ   rJ   rL   is_dmlI  rN   r   is_sqlis_ddlnamed_with_column_is_column_element_is_keyed_column_element_is_text_clause_is_from_clause_is_tuple_type_is_table_value_is_select_base_is_select_statement	_is_table_is_subqueryc                 C  
   t | dS )Nschemahasattrrq   rJ   rJ   rL   has_schema_attr]     
r   sstrTypeGuard[quoted_name]c                 C  r   )Nquoter   r   rJ   rJ   rL   is_quoted_namea  r   r   object!TypeGuard[_HasClauseElement[Any]]c                 C  r   )NrM   r   r   rJ   rJ   rL   is_has_clause_elemente  r   r   TypeGuard[ValuesBase]c                 C  s   | j o| jp| jS rI   )r   	is_insert	is_updaterk   rJ   rJ   rL   is_insert_updatei  s   r   exc.ArgumentErrorc                   C  s
   t dS )Nz{Additional keyword arguments are not accepted by this function/method.  The presence of **kw is for pep-484 typing purposes)r   ArgumentErrorrJ   rJ   rJ   rL   _no_kwm  s   r   methnamekwDict[str, Any]r	   c                 C  s    t |d }t|  d| d)Nr   z% got an unexpected keyword argument '')list	TypeError)r   r   krJ   rJ   rL   _unexpected_kwt  s   r   val'SQLCoreOperations[_T]'!'SQLCoreOperations[Optional[_T]]'c                 C  rH   rI   rJ   r   rJ   rJ   rL   Nullabley     r   roles.ExpressionElementRole[_T])roles.ExpressionElementRole[Optional[_T]]c                 C  rH   rI   rJ   r   rJ   rJ   rL   r     r   Type[_T]Type[Optional[_T]]c                 C  rH   rI   rJ   r   rJ   rJ   rL   r        _TypedColumnClauseArgument[_T](_TypedColumnClauseArgument[Optional[_T]]c                 C     | S )a  Types a column or ORM class as nullable.

    This can be used in select and other contexts to express that the value of
    a column can be null, for example due to an outer join::

        stmt1 = select(A, Nullable(B)).outerjoin(A.bs)
        stmt2 = select(A.data, Nullable(B.data)).outerjoin(A.bs)

    At runtime this method returns the input unchanged.

    .. versionadded:: 2.0.20
    rJ   r   rJ   rJ   rL   r        c                 C  rH   rI   rJ   r   rJ   rJ   rL   NotNullable  r   r   c                 C  rH   rI   rJ   r   rJ   rJ   rL   r     r   c                 C  rH   rI   rJ   r   rJ   rJ   rL   r     r   Optional[Type[_T]]c                 C  rH   rI   rJ   r   rJ   rJ   rL   r     r   CUnion[_TypedColumnClauseArgument[Optional[_T]], Optional[Type[_T]]]c                 C  r   )a~  Types a column or ORM class as not nullable.

    This can be used in select and other contexts to express that the value of
    a column cannot be null, for example due to a where condition on a
    nullable column::

        stmt = select(NotNullable(A.value)).where(A.value.is_not(None))

    At runtime this method returns the input unchanged.

    .. versionadded:: 2.0.20
    rJ   r   rJ   rJ   rL   r     r   )ri   r"   rF   rj   )ri   r"   rF   rm   )ro   r.   rF   rp   )ri   r'   rF   rt   )ri   r'   rF   rv   )ri   r'   rF   rx   )ri   r'   rF   rz   )ro   r|   rF   r}   )ro   r|   rF   r   )ro   r   rF   r   )ro   r   rF   r   )ro   r   rF   r   )ro   r2   rF   r   )ro   r2   rF   r   )ri   r'   rF   r   )ro   r.   rF   r   )r   r   rF   r   )r   r   rF   r   )ri   r'   rF   r   )rF   r   )r   r   r   r   rF   r	   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )r   r   rF   r   )
__future__r   operatortypingr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r    r   r   r   
inspectionr   util.typingr   r   r   r   r   r   r   decimalr   uuidr    baser!   compilerr"   r#   r$   dmlr%   r&   elementsr'   r(   r)   r*   r+   r,   lambdasr-   r.   r   r/   
selectabler0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   sqltypesr;   r<   type_apir=   r>   r?   rA   rC   rD   rE   rT   intr   floatrW   ColumnsClauseRolerX   ExpressionElementRole_TextCoercedExpressionArgumentTypedColumnsClauseRole_ColumnsClauseArgument_TypedColumnClauseArgumentrZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   _ColumnExpressionArgumentre   __annotations__"_ColumnExpressionOrLiteralArgument#_ColumnExpressionOrStrLabelArgument_ByArgument	_InfoType_FromClauseArgumentJoinTargetRole_JoinTargetArgumentOnClauseRole_OnClauseArgumentCompoundElementRole#_SelectStatementForCompoundArgumentDMLColumnRole_DMLColumnArgumentrf   _DMLColumnKeyMappingDDLConstraintColumnRole_DDLColumnArgument_DMLTableArgumentimmutabledict_PropagateAttrsType_TypeEngineArgument_EquivalentColumnMap_LimitOffsetTypebool_AutoIncrementTyperl   rn   rr   ru   rw   ry   r{   r~   r   r   r   r   r   r   r   
attrgetterr   r   r   r   r   r   r   r   rJ   rJ   rJ   rL   <module>   s  

	










































