?????????? ????????? - ??????????????? - /home/agenciai/.local/lib/python3.9/site-packages/sqlalchemy/sql/__pycache__/elements.cpython-39.pyc
???????
a ��Jh � @ s d Z ddlmZ ddlmZ ddlmZ ddlZddlZddl Z ddl Z ddl mZ ddl mZ ddl m Z dd l mZ dd l mZ ddl mZ ddl mZ dd l mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl 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.m0Z0 dd(l.m1Z1 dd)l.m2Z2 dd*l.m3Z3 dd+l.m4Z4 dd,l.m5Z5 dd-l.m6Z6 dd.l.m7Z7 dd/l.m8Z8 dd0l9m:Z: dd1l9m;Z; dd2l!m<Z< dd3l"m=Z= dd4l$m>Z> dd5l?m@Z@ dd6l?mAZA dd7l?mBZB dd8l?mCZC dd9l?mDZD d:d;l mEZE d:d<l mFZF d:d=l mGZG d:d>lGmHZH d:d?lGmIZI d:d@lJmKZK d:dAlJmLZL d:dBlJmMZM e j�r�ddCl&mNZN ddDl&mOZO ddEl&mPZP ddFl&mQZQ ddGl&mRZR ddHl&mSZS ddIl&mTZT ddJl.mUZU ddKl9mVZV ddLl9mWZW ddMlXmYZY ddNlXmZZZ ddOl[m\Z\ ddPl"m]Z] ddQl^m_Z_ ddRl^m`Z` ddSl^maZa ddTl^mbZb ddUlcmdZd ddVlcmeZe ddWlcmfZf ddXlcmgZg ddYlhmiZi ddZl%mjZj dd[l?mkZk dd\l?mlZl dd]l?mmZm d:d^lnmoZo d:d_lnmpZp d:d`lqmrZr d:dalqmsZs d:dblqmtZt d:dclqmuZu d:ddlqmvZv d:delwmxZx eeyef Zzeeye{ef Z|edfdgdh�Z}ediedjdk�Z~edldgdh�Zedmdndh�Z�edodpdh�Z�ed�dgdrdsdtdu�dvdw��Z�e�d dfdxdsdtdu�dydw��Z�e�ddgdzdsd{du�d|dw��Z��ddgdzdsd{du�d}dw�Z��dd~dd�d��d�d��Z�G d�d�� d�eD�Z�eFj�G d�d�� d�e-e:e>eAe���Z�G d�d�� d�e��Z�G d�d�� d�e#j�e#j�e#j�e��Z�G d�d�� d�ee~ e=eI�Z�G d�d�� d�e�e~ e#j�e~ eI�Z�e�Z�G d�d�� d�e#j�e#j�e#j�e#j�e} e#j�e#j�e#j�e#j�e#j�e#j�e�e} e��Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e} �Z�G d�d�� d�e#j�e�e} �Z�G d�d�� d�e��Z�G d�d�� d�e#j�e#j�e#j�e#j�e#j�e#j�e#j�e#j�e4e3e�e#j�e eFj�d� �Z�G d�d�� d�e8e#j�d e�d �Z�e���� G d�d�� d�e8e#j�e� e�e� �Z�e���� G d�d�� d�e8e#j�e� e�e� �Z�e���� G d�d�� d�e#j�e#j�e#j�e#j�e��Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e� �Z�e�j�Z�e�j�Z�G d�d�� d�e�e�eed�f �ZG d�d�� d�e�e} �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e{ �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e} �Z�G d�d�� d�e�e� e�e� �Z�G d�d d�e�e} �Z�G d�dĄ d�e�e �Z�G d�dƄ d�e�e �Z�G d�dȄ d�e��Z�G d�dʄ d�e�e�e} �Z�G d�d̄ d�e�e} �Z�G d�d΄ d�e�Z�e�j�Z�e�j�Z�ee{e�f Z�G d�dЄ d�e�e} �Z�G d�d҄ d�e�e} �Z�G d�dԄ d�e4e�e} �Z�G d�dք d�e�e} �Z�eLd׃Z�G d�dل d�e#j�e} e�e} �Z�G d�dۄ d�e#j�e#j�e} e#j�e6e�e} �Z�G d�d݄ d�e�e} �Z�G d�d߄ d�e�e� �Z�G d�d� d�e3e��Z�G d�d� d�eZ�G d�d� d�eZ�G d�d� d�eZ�G d�d� d�eGj�ẽZ�d�d�d�d�d�Z�d�d�d�d�d�ZՐdd�d�Z�G d�d�� d�eGj�d� �Z�G d�d�� d�e,�Z�G d�d�� d�eӃZ�G d�d�� d�eڃZ�e�Z�G d�d�� d�eڃZ�dS ( z�Core 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)rf � covariant�_OPT�_NT�_NUMERIC�_NMT�_NUMBERF�_TypeEngineArgument[_T]�bool�BindParameter[_T])�value�type_�literal_execute�returnc C s d S �N� �rq rr rs rv rv �L/home/agenciai/.local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py�literal� s ry �Nonec C s d S ru rv rw rv rv rx ry � s �"Optional[_TypeEngineArgument[Any]]�BindParameter[Any]c C s d S ru rv rw rv rv rx ry � s c C s t jtj| ||d�S )a Return 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 )rr rs )r �expectr ZLiteralValueRolerw rv rv rx ry � s ��str�!Optional[_TypeEngineArgument[_T]]zColumnClause[_T])�textrr rt c C s t | |dd�S )a� Produce 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)rr � is_literal��ColumnClause)r� rr rv rv rx �literal_column� s #r� c @ sr e Zd ZdZdZdZdZdZe� d�e� d�dd d ddd �dd���Z dd� Zdddd�dd�Zdd�dd�Z dS )�CompilerElementznbase class for SQL elements that can be compiled to produce a SQL string. .. versionadded:: 2.0 rv Zcompiler_elementF�defaultzsqlalchemy.engine.defaultzsqlalchemy.engine.urlN�Optional[_HasDialect]�Optional[Dialect]r rL ��bind�dialect�kwrt c K sV |du rD|r|j }n0| jdkr(| �� }ntjj}|j�| j��� � }| j |fi |��S )a� Compile 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` Nr� ) r� �stringify_dialect�_default_dialectr<