gdZddlmZddlmZddlmZddlZddlZddl Z ddl Z ddl m Z ddl m Z ddl m Z dd l mZdd l mZdd l mZdd l mZdd l mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl m!Z!ddl m"Z"ddl m#Z#ddl m$Z$ddl m%Z%dd l&m'Z'dd!l&m(Z(dd"l&m)Z)dd#l&m*Z*dd$l+m,Z,dd%l+m-Z-dd&l.m/Z/dd'l.m0Z0dd(l.m1Z1dd)l.m2Z2dd*l.m3Z3dd+l.m4Z4dd,l.m5Z5dd-l.m6Z6dd.l.m7Z7dd/l.m8Z8dd0l9m:Z:dd1l9m;Z;dd2l!mZ>dd5l?m@Z@dd6l?mAZAdd7l?mBZBdd8l?mCZCdd9l?mDZDd:d;l mEZEd:dlGmHZHd:d?lGmIZId:d@lJmKZKd:dAlJmLZLd:dBlJmMZMe j:rddCl&mNZNddDl&mOZOddEl&mPZPddFl&mQZQddGl&mRZRddHl&mSZSddIl&mTZTddJl.mUZUddKl9mVZVddLl9mWZWddMlXmYZYddNlXmZZZddOl[m\Z\ddPl"m]Z]ddQl^m_Z_ddRl^m`Z`ddSl^maZaddTl^mbZbddUlcmdZdddVlcmeZeddWlcmfZfddXlcmgZgddYlhmiZiddZl%mjZjdd[l?mkZkdd\l?mlZldd]l?mmZmd:d^lnmoZod:d_lnmpZpd:d`lqmrZrd:dalqmsZsd:dblqmtZtd:dclqmuZud:ddlqmvZvd:delwmxZxeeyefZzeeye{efZ|edfdghZ}edie djkZ~edldghZedmdnhZedodphZe d ddqZe d ddrZe d ddsZ d ddtZ d dduZGdvdweDZeFj Gdxdye-e:e>eAeZGdzd{eZGd|d}e#je#je#jeZGd~dee~e=eIZGddee~e#je~eIZeZGdde#j e#j"e#j$e#j&e}e#j(e#je#j*e#je#je#j,ee}eZGddee}ZGddee}ZGdde#j4ee}ZGddeZGdde#je#j,e#j"e#j$e#j(e#j:e#j<e#j4e4e3ee#j&e eFj>dZGdde8e#jBdedZejGGdde8e#jBeeeZejGGdde8e#jBeeeZejGGdde#j4e#j(e#je#jeZGddee}ZGddee}ZGddeeZejVZejXZGddeeee dfZGddee}ZGddee}ZGddee}ZGddee}ZGddee{ZGddee}ZGddee ZGddee}ZGddee}ZGddeeeeZGddee}ZGddee ZGddee ZGddeZGddeee}ZGddee}ZGddeZej|Zej~Zee{efZGddee}ZGdÄdee}ZGdńde4ee}ZGdDŽdee}ZeLdɫZGdʄde#je}ee}ZGd̄de#je#je}e#je6ee}ZGd΄dee}ZGdЄdeeZGd҄de3eZGdԄdeΫZGdքdeΫZGd؄deΫZGdڄdeGje̫Zdd܄ZddބZdd߄ZGddeGjdZGdde,ZGddeӫZGddeګZeZGddeګZy)zCore SQL expression elements, including :class:`_expression.ClauseElement`, :class:`_expression.ColumnElement`, and derived classes. ) annotations)Decimal)EnumN) AbstractSet)Any)Callable)cast)Dict) FrozenSet)Generic)Iterable)Iterator)List)Mapping)Optional)overload)Sequence)Set)Tuple)Type) TYPE_CHECKING)TypeVar)Union) coercions) operators)roles) traversals)type_api)has_schema_attr)is_named_from_clause)is_quoted_name) is_tuple_type) Annotated)SupportsWrappingAnnotations)_clone)_expand_cloned) _generative)_NoArg) Executable) Generative) HasMemoized) Immutable)NO_ARG)SingletonConstant)MemoizedHasCacheKey)NO_CACHE)_document_text_coercion)ColumnOperators)HasCopyInternals)cloned_traverse)ExternallyTraversible)InternalTraversal)traverse) Visitable)exc) inspection)util)!HasMemoized_ro_memoized_attribute) TypingOnly)Literal) ParamSpec)Self) _ByArgument)_ColumnExpressionArgument)#_ColumnExpressionOrStrLabelArgument) _HasDialect) _InfoType)_PropagateAttrsType)_TypeEngineArgument) ColumnSet)_CacheKeyTraversalType)CacheKey)Compiled) SQLCompiler)FunctionElement) OperatorType)Column)DefaultGenerator) FetchedValue) ForeignKey)_SelectIterable) FromClause)NamedFromClause) TextualSelect) TupleType) TypeEngine)_CloneCallableType)_TraverseInternalsType)anon_map) Connection)Dialect)_CoreMultiExecuteParams) CacheStats)CompiledCacheType)CoreExecuteOptionsParameter)SchemaTranslateMapType)Result_Tr)bound_T_coT)rg covariant_OPT_NT_NUMERIC_NMT_NUMBERcyNvaluetype_literal_executes H/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/sql/elements.pyliteralrw cyrprqrrs rvrwrwrxrycyrprqrrs rvrwrws rycPtjtj|||S)aReturn a literal clause, bound to a bind parameter. Literal clauses are created automatically when non- :class:`_expression.ClauseElement` objects (such as strings, ints, dates, etc.) are used in a comparison operation with a :class:`_expression.ColumnElement` subclass, such as a :class:`~sqlalchemy.schema.Column` object. Use this function to force the generation of a literal clause, which will be created as a :class:`BindParameter` with a bound value. :param value: the value to be bound. Can be any Python object supported by the underlying DB-API, or is translatable via the given type argument. :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` which will provide bind-parameter translation for this literal. :param literal_execute: optional bool, when True, the SQL engine will attempt to render the bound value directly in the SQL statement at execution time rather than providing as a parameter value. .. versionadded:: 2.0 )rtru)rexpectrLiteralValueRolerrs rvrwrws):     '  ryct||dS)aProduce a :class:`.ColumnClause` object that has the :paramref:`_expression.column.is_literal` flag set to True. :func:`_expression.literal_column` is similar to :func:`_expression.column`, except that it is more often used as a "standalone" column expression that renders exactly as stated; while :func:`_expression.column` stores a string name that will be assumed to be part of a table and may be quoted as such, :func:`_expression.literal_column` can be that, or any other arbitrary column-oriented expression. :param text: the text of the expression; can be any SQL expression. Quoting rules will not be applied. To specify a column-name expression which should be subject to quoting rules, use the :func:`column` function. :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` object which will provide result-set translation and additional expression semantics for this column. If left as ``None`` the type will be :class:`.NullType`. .. seealso:: :func:`_expression.column` :func:`_expression.text` :ref:`tutorial_select_arbitrary_text` T)rt is_literal) ColumnClause)textrts rvliteral_columnrsF Ed ;;ryceZdZdZdZdZdZdZejdejd d dd Z d Z dd Z dd Z y)CompilerElementznbase class for SQL elements that can be compiled to produce a SQL string. .. versionadded:: 2.0 rqcompiler_elementFdefaultzsqlalchemy.engine.defaultzsqlalchemy.engine.urlNc .||r |j}nr|jdk(r|j}nRtjj }|j j|jj}|j|fi|S)aCompile this SQL expression. The return value is a :class:`~.Compiled` object. Calling ``str()`` or ``unicode()`` on the returned value will yield a string representation of the result. The :class:`~.Compiled` object also can return a dictionary of bind parameter names and values using the ``params`` accessor. :param bind: An :class:`.Connection` or :class:`.Engine` which can provide a :class:`.Dialect` in order to generate a :class:`.Compiled` object. If the ``bind`` and ``dialect`` parameters are both omitted, a default SQL compiler is used. :param column_keys: Used for INSERT and UPDATE statements, a list of column names which should be present in the VALUES clause of the compiled statement. If ``None``, all columns from the target table object are rendered. :param dialect: A :class:`.Dialect` instance which can generate a :class:`.Compiled` object. This argument takes precedence over the ``bind`` argument. :param compile_kwargs: optional dictionary of additional parameters that will be passed through to the compiler within all "visit" methods. This allows any custom flag to be passed through to a custom compilation construct, for example. It is also used for the case of passing the ``literal_binds`` flag through:: from sqlalchemy.sql import table, column, select t = table("t", column("x")) s = select(t).where(t.c.x == 5) print(s.compile(compile_kwargs={"literal_binds": True})) .. seealso:: :ref:`faq_sql_expression_string` r) dialectstringify_dialect_default_dialectr= preloaded engine_urlURLcreate get_dialect _compiler)selfbindrkwurls rvcompilezCompilerElement.compilesh ?,,''94//1nn// #''..**+-"t~~g,,,rycVtjj}|jSrp)r=rengine_defaultStrCompileDialect)rrs rvrz CompilerElement._default_dialect6s ..//((**ryc Ztrt|tsJ|j||fi|S)zNReturn a compiler appropriate for this ClauseElement, given a Dialect.)r isinstance ClauseElementstatement_compilerrrrs rvrzCompilerElement._compiler:s1 dM2 22)w))'4>2>>ryc4t|jSrp)strrrs rv__str__zCompilerElement.__str__Bs4<<>""ryNN)rOptional[_HasDialect]rOptional[Dialect]rrreturnrM)rr_rrrrMrr)__name__ __module__ __qualname____doc__ __slots____visit_name__supports_executionrr=preload_modulerrrrrqryrvrrsI'N!T45T01'+%)=-#=-#=- =-  =-26=-~+?#ryrceZdZUdZdZerejd,dZn ejZejd-dZ dZ de d<dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"e#d.d Z$dZ%d e d <d e d<e&j r dd d/dZ'ejPd0dZ)d1dZ*d2dZ+d3dZ,dZ-dZ.e#dZ/e0jbdZ2dZ3e#dZ4dZ5 d4dZ6 d5dZ7d6dZ8 d7 d8d Z9 d7 d9d!Z: d:d"Z;d;d#Z< d7 dd dd& d>d'Z?d(Z@d=d)ZAd*ZBd+ZCy)?rzSBase class for elements of a programmatically constructed SQL expression. clausecy)zlike annotations, however these propagate outwards liberally as SQL constructs are built, and are set up at construction time. Nrqrs rv_propagate_attrszClauseElement._propagate_attrsWs rycyrprqrs rv descriptionzClauseElement.descriptionbryNzOptional[Self] _is_clone_ofTFcyrprqrs rv_order_by_label_elementz%ClauseElement._order_by_label_element~rryrK_cache_key_traversalColumnElement[bool]negation_clause.) omit_attrsc yrprq)rrrs rv get_childrenzClauseElement.get_childrens&)rycgSrprqrs rv _from_objectszClauseElement._from_objects ryc:tj||_|Srp)r= immutabledictr)rvaluess rv_set_propagate_attrsz"ClauseElement._set_propagate_attrss!% 2 26 : rycF|j}|j||Srp)rr)rrs rv_default_compilerzClauseElement._default_compilers#'')))'488ryc |j}|jj|j}|rG|jj j Dcic] \}}||vs ||c}}|_n|jj |_|j }| ||_|S||_|Scc}}w)zCreate a shallow copy of this ClauseElement. This method may be used by a generative API. Its also used as part of the "deep" copy afforded by a traversal that combines the _copy_internals() method. )_memoized_keys __class____new____dict__copyitemsr)rrskipckvccs rvr&zClauseElement._clones"" NN " "4>> 2 "&!3!3!5!;!;!=!=A$1!=AJ++-AJ  !~48s  B:,B:c|S)za hook to allow the right side of a binary expression to respond to a negation of the binary expression. Used for the special case of expanding bind parameter with IN. rq)r negated_op original_ops rv_negate_in_binaryzClauseElement._negate_in_binary  ryc|S)zin the context of binary expression, convert the type of this object to the one given. applies only to :class:`_expression.ColumnElement` classes. rqrrts rv_with_binary_element_typez'ClauseElement._with_binary_element_typerryc|jS)a.return the 'constructor' for this ClauseElement. This is for the purposes for creating a new object of this type. Usually, its just the element's __class__. However, the "Annotated" version of the object overrides to return the class of its proxied element. rrs rv _constructorzClauseElement._constructors~~rycvtj}|}| |j||j}| |S)aReturn the set consisting all cloned ancestors of this ClauseElement. Includes this ClauseElement. This accessor tends to be used for FromClause objects to identify 'equivalent' FROM clauses, regardless of transformative operations. )r= column_setaddr)rsfs rv _cloned_setzClauseElement._cloned_sets> OO %)m EE!HAmrycP|j|j}|j|Srp)rrs rv _de_clonezClauseElement._de_clones,+$$D+ ryctd)NzFThis SQL expression has no entity namespace with which to filter from.)AttributeErrorrs rventity_namespacezClauseElement.entity_namespaces )  ryc|jj}|jdd|jdd|S)Nr_generate_cache_key)rrpop)rds rv __getstate__zClauseElement.__getstate__s6 MM    nd# #T*ryc|jr+trt|tsJ|j |||St j |rp)rrrr*_execute_clauseelementr;ObjectNotExecutableErrorr connectiondistilled_paramsexecution_optionss rv_execute_on_connectionz$ClauseElement._execute_on_connectionsO  " "!$ 33344&(9 ..t4 4rycD|j|||jS)zan additional hook for subclasses to provide a different implementation for connection.scalar() vs. connection.execute(). .. versionadded:: 2.0 )rscalarrs rv_execute_on_scalarz ClauseElement._execute_on_scalars'** (*; &( rycx|j}|g}t|id|ji|S|jS)aReturn the list of :class:`.BindParameter` objects embedded in the object. This accomplishes the same purpose as ``visitors.traverse()`` or similar would provide, however by making use of the cache key it takes advantage of memoization of the key to result in fewer net method calls, assuming the statement is also going to be executed. bindparam)rr8append bindparams)rkeyrs rv_get_embedded_bindparamsz&ClauseElement._get_embedded_bindparams!sE&&( ;35J T2 Z->->? @ >> !ryc (|jd||S)aReturn a copy with :func:`_expression.bindparam` elements replaced. Same functionality as :meth:`_expression.ClauseElement.params`, except adds `unique=True` to affected bind parameters so that multiple statements can be used. T_replace_paramsr_ClauseElement__optionaldictkwargss rv unique_paramszClauseElement.unique_params7s##D.&AAryc (|jd||S)aReturn a copy with :func:`_expression.bindparam` elements replaced. Returns a copy of this ClauseElement with :func:`_expression.bindparam` elements replaced with values taken from the given dictionary:: >>> clause = column("x") + bindparam("foo") >>> print(clause.compile().params) {'foo':None} >>> print(clause.params({"foo": 7}).compile().params) {'foo':7} Frrs rvparamszClauseElement.paramsGs&##E>6BBryc^|rj|dfd }t|dddd|iS)Nc~|jvr|j|_d|_r|jyyNF)rrsrequired_convert_to_unique)rruniques rvvisit_bindparamz6ClauseElement._replace_params..visit_bindparames:xx6!#DHH- % '')ryT) maintain_keydetect_subquery_colsr)rBindParameter[Any]rNone)updater5)rr optionaldictrrs ` ` rvrzClauseElement._replace_params\s;  MM, ' * !4 @ / *  ryc 0tj||fi|S)aCompare this :class:`_expression.ClauseElement` to the given :class:`_expression.ClauseElement`. Subclasses should override the default behavior, which is a straight identity comparison. \**kw are arguments consumed by subclass ``compare()`` methods and may be used to modify the criteria for comparison (see :class:`_expression.ColumnElement`). )rcomparerotherrs rvrzClauseElement.comparers!!$444ryc|S)aApply a 'grouping' to this :class:`_expression.ClauseElement`. This method is overridden by subclasses to return a "grouping" construct, i.e. parenthesis. In particular it's used by "binary" expressions to provide a grouping around themselves when placed into a larger expression, as well as by :func:`_expression.select` constructs when placed into the FROM clause of another :func:`_expression.select`. (Note that subqueries should be normally created using the :meth:`_expression.Select.alias` method, as many platforms require nested SELECT statements to be named). As expressions are composed together, the application of :meth:`self_group` is automatic - end-user code should never need to use this method directly. Note that SQLAlchemy's clause constructs take operator precedence into account - so parenthesis might not be needed, for example, in an expression like ``x OR (y AND z)`` - AND takes precedence over OR. The base :meth:`self_group` method of :class:`_expression.ClauseElement` just returns self. rqragainsts rv self_groupzClauseElement.self_groups 6 ryc|S)zVReturn this :class:`_expression.ClauseElement` without any groupings. rqrs rv_ungroupzClauseElement._ungroups  ry)for_executemanyschema_translate_mapc ||jr|j}nd}|rtr|J|\}} ||t|t ||f} |j | } | *|j } |j|f||||d|} | || <n[|j} nNd} |j|f||||d|} |js |j} n| |j} n |j} | | | fS)N) cache_key column_keysr!r") _supports_statement_cacherrtupleboolget CACHE_MISSr CACHE_HITNO_DIALECT_SUPPORTCACHING_DISABLED NO_CACHE_KEY) rrcompiled_cacher%r!r"relem_cache_keyr$extracted_paramsr compiled_sql cache_hits rv_compile_w_cachezClauseElement._compile_w_cachesB  %'*K*K!557N!N  %%111*8 'I'k")* C*--c2L##.. -t~~ , +$3)=      '3s##-- # )4>>(' /%9   L44#66 '#44 #00 -y88rycRt|dr |jS|jS)Nr)hasattrr_negaters rv __invert__zClauseElement.__invert__s' 4* +'' '<<> !ryc|jtj}t|tsJt |tjS)Nr)operatorrrinvr ColumnElementUnaryExpressionrgroupeds rvr7zClauseElement._negates7//)--/8'=111w??ryctd)N+Boolean value of this clause is not defined) TypeErrorrs rv__bool__zClauseElement.__bool__sEFFryc|j}|tj|Sd|j|jj t ||fzS)Nz<%s.%s at 0x%x; %s>)robject__repr__rrrid)rfriendlys rvrHzClauseElement.__repr__sR##  ??4( ((''4 , ryrrHr Optional[str]rzOptional[Label[Any]])rztyping_Tuple[str, ...]rrrzIterable[ClauseElement]rzList[FromClause])rMapping[str, Any]rrB)rrN)rrrrB)rr^rr`rrcrz Result[Any])rr^rr`rrcrr)rSequence[BindParameter[Any]]rp)rzOptional[Dict[str, Any]]rrrrB)rOptional[Mapping[str, Any]]rrrrB)rr(rrRrzDict[str, Any]rrB)rrrrrr()rOptional[OperatorType]rr)rr)rr_r/zOptional[CompiledCacheType]r%z List[str]r!r(r"z Optional[SchemaTranslateMapType]rrrzJtyping_Tuple[Compiled, Optional[Sequence[BindParameter[Any]]], CacheStats])Drrrrrrr=memoized_propertyr EMPTY_DICTro_memoized_propertyrr__annotations__is_clause_element is_selectableis_dml_is_column_element_is_keyed_column_element _is_table!_gen_static_annotations_cache_key _is_textual_is_from_clause_is_returns_rows_is_text_clause_is_from_container_is_select_container_is_select_base_is_select_statement_is_bind_parameter_is_clause_list_is_lambda_element_is_singleton_constant _is_immutable_is_starpropertyrrtypingrro_non_memoized_propertyrrrr&rrrr,memoized_attributerrrrrrrrr rrrr r4r8r7rErHrqryrvrrFs  N      ?? $(L.'M F$I(-%KOO O O"MH 4807(( ;> *!7 *EH * $ * ""#9:  ##$,    5 52 57 5  527   "048B0BB  B$7;C3CC  C*  2     , 515- :!&AE@9@94 @9  @9  @9?@9@9 @9D"@ G ryrcNeZdZdZej rddZ d ddZyy)DQLDMLClauseElementz|represents a :class:`.ClauseElement` that compiles to a DQL or DML expression, not DDL. .. versionadded:: 2.0 c y)zRReturn a compiler appropriate for this ClauseElement, given a Dialect.Nrqrs rvrzDQLDMLClauseElement._compiler s ryNc yrprq)rrrrs rvrzDQLDMLClauseElement.compiles ry)rr_rrrrNr)rrrrrrrrN)rrrrrnrrrrqryrvrrrrsO +/)- ' '      ryrrc0eZdZdZdZej ZdZy)CompilerColumnElementzdA compiler-only column element used for ad-hoc string compilations. .. versionadded:: 2.0 rqFN) rrrrrr=rUr_is_collection_aggregaterqryrvrvrvs  I$ryrvceZdZdZej rdejdodZ dpdZ dpdZ e dqdd drdZ e ds dtdZ du dtd Z dv dwd Z dxd Zdxd Zdyd ZdzdZdzdZd{dZdzdZdzdZdzdZdzdZdzdZdzdZd|dZdzdZd}dZe d~dZe ddZddZe d~dZe ddZddZe dd Ze dd!Zdd"Z d dd#Z d dd$Z!dd%Z"dd&Z#dd'Z$d|d(Z%dd)Z&dd*Z' dd+Z( dd,Z) dd-Z* d dd.Z+ d dd/Z, d dd0Z- d dd1Z.dd2Z/dd3Z0dd4Z1 d dd5Z2 d dd6Z3 d dd7Z4 d dd8Z5dd9Z6dd:Z7dd;Z8 d dd<Z9 d dd=Z:d|d>Z;d|d?Zd|dBZ?d|dCZ@ddDZA d ddEZBddFZCddGZDddHZEe ddIZFe ddJZFe ddKZFddLZFe ddMZGe ddNZGddOZGe ddPZHe ddQZHddRZHe ddSZIe ddTZIddUZIe ddVZJe ddWZJddXZJe ddYZKe ddZZKdd[ZKe dd\ZLe dd]ZLdd^ZLe dd_ZMe dd`ZMddaZMe ddbZNe ddcZNe dddZNddeZNe ddfZOe ddgZOddhZOe ddiZPe ddjZPddkZPe ddlZQe ddmZQddnZQyy)SQLCoreOperationsrqcyrprqrs rvrz"SQLCoreOperations._propagate_attrs7s;>rycyrprqroprrs rvoperatezSQLCoreOperations.operate:!$ryc yrprqr|s rvreverse_operatez!SQLCoreOperations.reverse_operate>rryN) python_implcyrprqropstring precedence is_comparison return_typers rvr}zSQLCoreOperations.opBs7:rycyrprqrs rvr}zSQLCoreOperations.opMs69rycyrprqrs rvr}zSQLCoreOperations.opWs69rycyrprq)rrrrs rvbool_opzSQLCoreOperations.bool_op`s 7:rycyrprqrrs rv__and__zSQLCoreOperations.__and__gCrycyrprqrs rv__or__zSQLCoreOperations.__or__is3rycyrprqrs rvr8zSQLCoreOperations.__invert__kscrycyrprqrs rv__lt__zSQLCoreOperations.__lt__mSrycyrprqrs rv__le__zSQLCoreOperations.__le__orrycyrprqrs rv__hash__zSQLCoreOperations.__hash__us3rycyrprqrs rv__eq__zSQLCoreOperations.__eq__w rycyrprqrs rv__ne__zSQLCoreOperations.__ne__zrrycyrprqrs rvis_distinct_fromz"SQLCoreOperations.is_distinct_from}srycyrprqrs rvis_not_distinct_fromz&SQLCoreOperations.is_not_distinct_from3rycyrprqrs rv__gt__zSQLCoreOperations.__gt__rrycyrprqrs rv__ge__zSQLCoreOperations.__ge__rrycyrprqrs rv__neg__zSQLCoreOperations.__neg__sSrycyrprqrs rv __contains__zSQLCoreOperations.__contains__3rycyrprq)rindexs rv __getitem__zSQLCoreOperations.__getitem__rycyrprqrs rv __lshift__zSQLCoreOperations.__lshift__KNrycyrprqrs rvrzSQLCoreOperations.__lshift__@Crycyrprqrs rvrzSQLCoreOperations.__lshift__rycyrprqrs rv __rshift__zSQLCoreOperations.__rshift__rrycyrprqrs rvrzSQLCoreOperations.__rshift__rrycyrprqrs rvrzSQLCoreOperations.__rshift__rrycyrprqrs rvconcatzSQLCoreOperations.concatsGJrycyrprqrs rvrzSQLCoreOperations.concatsArycyrprqrs rvr2zSQLCoreOperations.__rsub__Vrrycyrprqrs rv__mul__zSQLCoreOperations.__mul__Xr$rycyrprqrs rvr7zSQLCoreOperations.__mul__^r'rycyrprqrs rvr7zSQLCoreOperations.__mul__arrycyrprqrs rv__rmul__zSQLCoreOperations.__rmul__cr$rycyrprqrs rvr;zSQLCoreOperations.__rmul__ir4rycyrprqrs rvr;zSQLCoreOperations.__rmul__lrrycyrprqrs rv__mod__zSQLCoreOperations.__mod__nsJMrycyrprqrs rvr?zSQLCoreOperations.__mod__qr'rycyrprqrs rvr?zSQLCoreOperations.__mod__trrycyrprqrs rv__rmod__zSQLCoreOperations.__rmod__vrrycyrprqrs rvrCzSQLCoreOperations.__rmod__yr4rycyrprqrs rvrCzSQLCoreOperations.__rmod__|rrycyrprqrs rv __truediv__zSQLCoreOperations.__truediv__~'*rycyrprqrs rvrGzSQLCoreOperations.__truediv__sLOrycyrprqrs rvrGzSQLCoreOperations.__truediv__sADrycyrprqrs rvrGzSQLCoreOperations.__truediv__rrycyrprqrs rv __rtruediv__zSQLCoreOperations.__rtruediv__rHrycyrprqrs rvrMzSQLCoreOperations.__rtruediv__BErycyrprqrs rvrMzSQLCoreOperations.__rtruediv__#rycyrprqrs rv __floordiv__zSQLCoreOperations.__floordiv__#&rycyrprqrs rvrSzSQLCoreOperations.__floordiv__rOrycyrprqrs rvrSzSQLCoreOperations.__floordiv__rQrycyrprqrs rv __rfloordiv__zSQLCoreOperations.__rfloordiv__rTrycyrprqrs rvrXzSQLCoreOperations.__rfloordiv__CFrycyrprqrs rvrXzSQLCoreOperations.__rfloordiv__rryrK)r}rPrrrrrColumnElement[Any])..) rrrintrr(r_TypeEngineArgument[_OPT]rOptional[Callable[..., Any]]rz'Callable[[Any], BinaryExpression[_OPT]])....) rrrr]rr(r"Optional[_TypeEngineArgument[Any]]rr_rz&Callable[[Any], BinaryExpression[Any]])rFNN)rN)rrrr]rr_rz'Callable[[Any], BinaryExpression[bool]])rrrBooleanClauseList)rzColumnElement[_T_co])rrrrrr])rUnaryExpression[_T_co])rrrr\)r _SQO[int]rrrzColumnElement[int])rrrr\)rz _SQO[str]rrrColumnElement[str]rp)rrrrMrBinaryExpression[bool])rrrzBinaryExpression[Any])rz=Union[Iterable[Any], BindParameter[Any], roles.InElementRole]rrf)rrrrfr )rrrrMrr(rr)rrrrrr)rrrrrr)rrrrMrr)rrrrrrMrre)rrrCollationClauseF)rrrrrr(rrf)rz _SQO[_T_co]rrc)rzCollectionAggregate[Any])r _SQO[_NMT]rrrzColumnElement[_NMT])rrdrrrColumnElement[_NUMERIC])rz _SQO[_NT]rrrzColumnElement[_NT])rrirrrrj)Rrrrrrnrr=non_memoized_propertyrr~rrr}rrrr8rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrr!r#r*r.r2r7r;r?rCrGrMrSrXrqryrvryry/sI  # #> $> %" %,/ %;> %  % %" %+. %:= %  % ""%  :9= : : :  : 3  :6 :5 :  : ""%>A8;  9 9 9  9 <  9 6  94 9  9 "'>B8<  9 9 9  9 <  9 6  94 9 8<  : : :6  : 5  : @>9@@ '   KN@@8FD N N C CC N N C CC J J ? ??7; ) )&3 ) # ) 7; ) )&3 ) # ) HFG<JJ ) ) $  ) ) ) $  ) ) ) $  )7; ) )&3 ) # ) 7; ) )&3 ) # ) 7; ) )&3 ) # ) 7; ) )&3 ) # ) ACB %)$  & &" &  & !  &%)$  & &" &  & !  &%)$  & &" &  & !  &%)$  & &" &  & !  & NNN8< & &'4 &  & JN % %-0 %9F %  % 64<;;:A>C ) )&) )6: ) # ) G77  & & &! &  &  % % %  %  % @ @@ N N L LA  & & &! &  & @ @@  & & &! &  & A AA  & & &! &  & @ @@  & & &! &  & A AA M M @ @@ N N A AA  * *$' * $ *  * O O D DD  * *%( * $ *  * E EE  & &%( &  &  & E EE  & &%( &  &  & F FFe ryryceZdZdZdZy)SQLColumnExpressionaA type that may be used to indicate any SQL column element or object that acts in place of one. :class:`.SQLColumnExpression` is a base of :class:`.ColumnElement`, as well as within the bases of ORM elements such as :class:`.InstrumentedAttribute`, and may be used in :pep:`484` typing to indicate arguments or return values that should behave as column expressions. .. versionadded:: 2.0.0b4 rqNrrrrrrqryrvrmrms IryrmceZdZUdZdZdZded<ded<dZdZded <dZ dZ e Z d ed <e jdAd Ze j dBdZdZd ed< ej(dBdZedBdZedBdZedBdZdZ dZ dZdZded<edCdDdZe dC dEdZ dC dEdZedFdZ edGdZ dHdZ ded<e!se jdId Z"ej(dJd!Z#d"Z$dKd#Z% dLd$Z& dLd%Z' dM dNd&Z(edHd'Z)edOd(Z*e jdPd)Z+e jdPd*Z,e jdPd+Z-dAd,Z.dQd-Z/dRd.Z0ej(dBd/Z1ej(dBd0Z2ddddd1 dSd2Z3dTd3Z4dUd4Z5 dC dVd5Z6e jdWd6Z7e jdXd7Z8ee jrd8d9dWd:Z:ee jrd8d;dWd<Z;dYd=ZZ=e jdXd?Z>dZd@Z?y)[r>aRepresent a column-oriented SQL expression suitable for usage in the "columns" clause, WHERE clause etc. of a statement. While the most familiar kind of :class:`_expression.ColumnElement` is the :class:`_schema.Column` object, :class:`_expression.ColumnElement` serves as the basis for any unit that may be present in a SQL expression, including the expressions themselves, SQL functions, bound parameters, literal expressions, keywords such as ``NULL``, etc. :class:`_expression.ColumnElement` is the ultimate base class for all such elements. A wide variety of SQLAlchemy Core functions work at the SQL expression level, and are intended to accept instances of :class:`_expression.ColumnElement` as arguments. These functions will typically document that they accept a "SQL expression" as an argument. What this means in terms of SQLAlchemy usually refers to an input which is either already in the form of a :class:`_expression.ColumnElement` object, or a value which can be **coerced** into one. The coercion rules followed by most, but not all, SQLAlchemy Core functions with regards to SQL expressions are as follows: * a literal Python value, such as a string, integer or floating point value, boolean, datetime, ``Decimal`` object, or virtually any other Python object, will be coerced into a "literal bound value". This generally means that a :func:`.bindparam` will be produced featuring the given value embedded into the construct; the resulting :class:`.BindParameter` object is an instance of :class:`_expression.ColumnElement`. The Python value will ultimately be sent to the DBAPI at execution time as a parameterized argument to the ``execute()`` or ``executemany()`` methods, after SQLAlchemy type-specific converters (e.g. those provided by any associated :class:`.TypeEngine` objects) are applied to the value. * any special object value, typically ORM-level constructs, which feature an accessor called ``__clause_element__()``. The Core expression system looks for this method when an object of otherwise unknown type is passed to a function that is looking to coerce the argument into a :class:`_expression.ColumnElement` and sometimes a :class:`_expression.SelectBase` expression. It is used within the ORM to convert from ORM-specific objects like mapped classes and mapped attributes into Core expression objects. * The Python ``None`` value is typically interpreted as ``NULL``, which in SQLAlchemy Core produces an instance of :func:`.null`. A :class:`_expression.ColumnElement` provides the ability to generate new :class:`_expression.ColumnElement` objects using Python expressions. This means that Python operators such as ``==``, ``!=`` and ``<`` are overloaded to mimic SQL operations, and allow the instantiation of further :class:`_expression.ColumnElement` instances which are composed from other, more fundamental :class:`_expression.ColumnElement` objects. For example, two :class:`.ColumnClause` objects can be added together with the addition operator ``+`` to produce a :class:`.BinaryExpression`. Both :class:`.ColumnClause` and :class:`.BinaryExpression` are subclasses of :class:`_expression.ColumnElement`: .. sourcecode:: pycon+sql >>> from sqlalchemy.sql import column >>> column("a") + column("b") >>> print(column("a") + column("b")) {printsql}a + b .. seealso:: :class:`_schema.Column` :func:`_expression.column` column_elementFr( primary_keyOptional[ColumnElement[_T]]rT_insert_sentinelzAbstractSet[ForeignKey] foreign_keyscgSrprqrs rv_proxieszColumnElement._proxies)rryrMcy)a}The named label that can be used to target this column in a result set in a "table qualified" context. This label is almost always the label used when rendering AS