HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/__pycache__/roles.cpython-310.pyc
o

���g��@s�ddlmZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	l
mZerPd
dlm
Z
d
dlmZd
d
lmZd
dlmZd
dlmZeded�Zededd�ZGdd�d�ZGdd�d�ZGdd�d�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e�ZGd'd(�d(e�ZGd)d*�d*e�Z Gd+d,�d,e e�Z!Gd-d.�d.eee�Z"Gd/d0�d0eee�Z#Gd1d2�d2e�Z$Gd3d4�d4e�Z%Gd5d6�d6eee%�Z&Gd7d8�d8ee%�Z'Gd9d:�d:e�Z(Gd;d<�d<e(�Z)Gd=d>�d>ee(�Z*Gd?d@�d@e*�Z+GdAdB�dBe#e�Z,GdCdD�dDe,e�Z-GdEdF�dFe,e�Z.GdGdH�dHe,e�Z/GdIdJ�dJe�Z0GdKdL�dLeee(�Z1GdMdN�dNe"e1�Z2GdOdP�dPe2�Z3GdQdR�dRe3�Z4GdSdT�dTe�Z5GdUdV�dVe�Z6GdWdX�dXe6e5�Z7GdYdZ�dZe5�Z8Gd[d\�d\e�Z9Gd]d^�d^ee�Z:Gd_d`�d`e6�Z;Gdadb�dbe2�Z<Gdcdd�dde�Z=Gdedf�dfe�Z>Gdgdh�dhe6�Z?Gdidj�dje(�Z@Gdkdl�dle�ZAGdmdn�dneA�ZBdoS)p�)�annotations)�Any)�Generic)�Optional)�
TYPE_CHECKING)�TypeVar�)�util)�Literal�)�_PropagateAttrsType)�Label)�_SelectIterable)�
FromClause)�Subquery�_T)�bound�_T_coT)r�	covariantc@seZdZdZdZdZdZdS)�SQLRolez�Define a "role" within a SQL statement structure.

    Classes within SQL Core participate within SQLRole hierarchies in order
    to more accurately indicate where they may be used within SQL statements
    of all types.

    .. versionadded:: 1.4

    �FN)�__name__�
__module__�__qualname__�__doc__�	__slots__�
allows_lambda�uses_inspectionrrr�?/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/roles.pyrs

rc@s"eZdZUdZdZded<dZdS)�UsesInspectionrNz
Literal[None]�
_post_inspectT)rrrrr �__annotations__rrrrrr-s
rc@�eZdZdZdZdS)�AllowsLambdaRolerTN)rrrrrrrrrr#3�r#c@r")�HasCacheKeyRolerzCacheable Core or ORM objectN�rrrr�
_role_namerrrrr%8r$r%c@r")�ExecutableOptionRolerz"ExecutionOption Core or ORM objectNr&rrrrr(=r$r(c@r")�LiteralValueRolerzLiteral Python valueNr&rrrrr)Br$r)c@r")�ColumnArgumentRolerzColumn expressionNr&rrrrr*Gr$r*c@r")�ColumnArgumentOrKeyRoler�Column expression or string keyNr&rrrrr+Lr$r+c@r")�StrAsPlainColumnRolerr,Nr&rrrrr-Qr$r-c@r")�ColumnListRolezCElements suitable for forming comma separated lists of expressions.rN�rrrrrrrrrr.V�r.c@r")�
StringRolez/mixin indicating a role that results in stringsrNr/rrrrr1\r0r1c@r")�TruncatedLabelRolerzString SQL identifierNr&rrrrr2br$r2c@s"eZdZdZdZeddd��ZdS)	�ColumnsClauseRolerz?Column expression, FROM clause, or other columns clause element�returnrcC�t���N��NotImplementedError��selfrrr�_select_iterablemsz"ColumnsClauseRole._select_iterableN)r4r)rrrrr'�propertyr;rrrrr3gs�r3c@r")�TypedColumnsClauseRolez'element-typed form of ColumnsClauseRolerNr/rrrrr=rr0r=c@r")�LimitOffsetRolerzLIMIT / OFFSET expressionNr&rrrrr>xr$r>c@r")�ByOfRolerzGROUP BY / OF / etc. expressionNr&rrrrr?}r$r?c@r")�GroupByRolerzGROUP BY expressionNr&rrrrr@�sr@c@r")�OrderByRolerzORDER BY expressionNr&rrrrrA�r$rAc@�eZdZdZdS)�StructuralRolerN�rrrrrrrrrC��rCc@r")�StatementOptionRolerz statement sub-expression elementNr&rrrrrF�r$rFc@r")�OnClauseRolerzCON clause, typically a SQL expression or ORM relationship attributeNr&rrrrrG���rGc@r")�WhereHavingRolerz$SQL expression for WHERE/HAVING roleNr&rrrrrI�r$rIc@seZdZdZdZd
dd�Zd	S)�ExpressionElementRolerzSQL expression element�name�
Optional[str]r4�	Label[_T]cCr5r6r7)r:rKrrr�label�szExpressionElementRole.labelN)rKrLr4rM)rrrrr'rNrrrrrJ�srJc@r")�
ConstExprRolerz#Constant True/False/None expressionNr&rrrrrO�r$rOc@rB)�LabeledColumnExprRolerNrDrrrrrP�rErPc@r")�BinaryElementRolerz'SQL expression element or literal valueNr&rrrrrQ�r$rQc@r")�
InElementRolerz?IN expression list, SELECT construct, or bound parameter objectNr&rrrrrR�rHrRc@r")�JoinTargetRolerzGJoin target, typically a FROM expression, or ORM relationship attributeNr&rrrrrS�rHrSc@s"eZdZUdZdZdZded<dS)�FromClauseRolerz2FROM expression, such as a Table or alias() objectF�bool�named_with_columnN)rrrrr'�_is_subqueryr!rrrrrT�s

rTc@rB)�StrictFromClauseRolerNrDrrrrrX�rErXc@s*eZdZdZerddd�d
dd�ZdSdS)�AnonymizedFromClauseRolerNF)rK�flatrKrLrZrUr4rcC�dSr6r)r:rKrZrrr�_anonymous_fromclause�sz.AnonymizedFromClauseRole._anonymous_fromclause)rKrLrZrUr4r)rrrrrr\rrrrrY�s��rYc@r")�ReturnsRowsRolerzcRow returning expression such as a SELECT, a FROM clause, or an INSERT/UPDATE/DELETE with RETURNINGNr&rrrrr]�rHr]c@s2eZdZdZdZerejddd��ZdSej	ZdS)	�
StatementRolerz"Executable SQL or text() constructr4rcCr[r6rr9rrr�_propagate_attrs�szStatementRole._propagate_attrsN)r4r)
rrrrr'rr	�memoized_propertyr_�
EMPTY_DICTrrrrr^�s
r^c@seZdZdZdZddd�ZdS)	�SelectStatementRolerz/SELECT construct or equivalent text() constructr4rcCstd��)NzFAll SelectStatementRole objects should implement a .subquery() method.r7r9rrr�subquerys�zSelectStatementRole.subqueryN)r4r)rrrrr'rcrrrrrb�srbc@rB)�
HasCTERolerNrDrrrrrd	rErdc@r")�	IsCTERolerz
CTE objectNr&rrrrre
r$rec@�eZdZdZdZdZdS)�CompoundElementRolezDSELECT statements inside a CompoundSelect, e.g. UNION, EXTRACT, etc.rz@SELECT construct for inclusion in a UNION or other set constructN�rrrrrr'rrrrrgs
�rgc@rB)�DMLRolerNrDrrrrrirEric@r")�DMLTableRolerz-subject table for an INSERT, UPDATE or DELETENr&rrrrrj r$rjc@r")�
DMLColumnRolerz*SET/VALUES column expression or string keyNr&rrrrrk%r$rkc@rf)�
DMLSelectRolez@A SELECT statement embedded in DML, typically INSERT from SELECTrz-SELECT statement or equivalent textual objectNrhrrrrrl*srlc@rB)�DDLRolerNrDrrrrrm1rErmc@r")�DDLExpressionRolerz)SQL expression element for DDL constraintNr&rrrrrn5r$rnc@r")�DDLConstraintColumnRolerz:String column name or column expression for DDL constraintNr&rrrrro:r$roc@r")�DDLReferredColumnRolerzBString column name or Column object for DDL foreign key constraintNr&rrrrrp?rHrpN)C�
__future__r�typingrrrrr�r	�util.typingr
�_typingr�elementsr
�
selectablerrrrrrrr#r%r(r)r*r+r-r.r1r2r3r=r>r?r@rArCrFrGrIrJrOrPrQrRrSrTrXrYr]r^rbrdrergrirjrkrlrmrnrorprrrr�<module>sz