%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyo

�
��4]c@s�dZddlmZddlmZddlmZddlmZddlmZddlmZddlmZdd	lm	Z	dd
lm
Z
ddlmZddlmZdd
lm
Z
ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZejrbddlmZneZdefd��YZdefd��YZdefd��YZeeeehZeeeeee
hZd�Zd�Z d �Z!e d!��Z"d"�Z#d#�Z$d$�Z%d%�Z&e d&��Z'e d'��Z(e d(��Z)e d)��Z*d*�Z+d+�Z,e e-d,��Z.e e-d-��Z/e e-d.��Z0e e-d/��Z1e e2d0��Z3e e2d1��Z4e d2��Z5e d3��Z6d4�Z7d5�Z8d6�Z9d7�Z:e e-e2d8��Z;e e-e2d9��Z<e e-e2d:��Z=e e-e2d;��Z>e e-e2d<��Z?e e-e2d=��Z@e d>��ZAe d?��ZBd@�ZCe dA��ZDe dB��ZEdC�ZFdD�ZGdE�ZHdF�ZIdG�ZJdH�ZKdI�ZLdJ�ZMdK�ZNdL�ZOdM�ZPdN�ZQe	e%e&eefZRdO�ZSiee6e
e6ee6ee
6ZTdP�ZUejVeGeeg�jWeeg�ZXeXjVeeLeMg�ZYejZdQdRdS�Z[ejZdTdRdU�Z\ejZdVdRdW�Z]i5dXe!6dXe"6dXe86dXe96dXe6dXeL6dXeM6dYe6dYe6dYe6dYe
6dYe6dZe6dZe6d[eG6d[eF6d\eA6d\eB6d\e06d\e16d\e.6d\e/6d\e56d\e66d\e)6d\e*6d\e6d\e6d\e'6d\e(6d\eD6d\eE6d\e6d\e6d\e6d\e
6d\e36d\e46d\e76d\e	6d\e%6d\e&6d]e6de6deC6d]eH6d]eI6d^e+6de#6d_e$6dSe[6e\e\6e]e]6Z^d`�Z_daS(bs*Defines operators used in SQL expressions.i����(tadd(tand_(tcontains(teq(tge(tgetitem(tgt(tinv(tle(tlshift(tlt(tmod(tmul(tne(tneg(tor_(trshift(tsub(ttruedivi(tutil(tdivt	OperatorscBs_eZdZd	Zd�Zd�Zd�Zded
d�Z	dd�Z
d�Zd�ZRS(s�Base of comparison and logical operators.

    Implements base methods
    :meth:`~sqlalchemy.sql.operators.Operators.operate` and
    :meth:`~sqlalchemy.sql.operators.Operators.reverse_operate`, as well as
    :meth:`~sqlalchemy.sql.operators.Operators.__and__`,
    :meth:`~sqlalchemy.sql.operators.Operators.__or__`,
    :meth:`~sqlalchemy.sql.operators.Operators.__invert__`.

    Usually is used via its most common subclass
    :class:`.ColumnOperators`.

    cCs|jt|�S(s.Implement the ``&`` operator.

        When used with SQL expressions, results in an
        AND operation, equivalent to
        :func:`~.expression.and_`, that is::

            a & b

        is equivalent to::

            from sqlalchemy import and_
            and_(a, b)

        Care should be taken when using ``&`` regarding
        operator precedence; the ``&`` operator has the highest precedence.
        The operands should be enclosed in parenthesis if they contain
        further sub expressions::

            (a == 2) & (b == 4)

        (toperateR(tselftother((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__and__;scCs|jt|�S(s*Implement the ``|`` operator.

        When used with SQL expressions, results in an
        OR operation, equivalent to
        :func:`~.expression.or_`, that is::

            a | b

        is equivalent to::

            from sqlalchemy import or_
            or_(a, b)

        Care should be taken when using ``|`` regarding
        operator precedence; the ``|`` operator has the highest precedence.
        The operands should be enclosed in parenthesis if they contain
        further sub expressions::

            (a == 2) | (b == 4)

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__or__SscCs
|jt�S(sImplement the ``~`` operator.

        When used with SQL expressions, results in a
        NOT operation, equivalent to
        :func:`~.expression.not_`, that is::

            ~a

        is equivalent to::

            from sqlalchemy import not_
            not_(a)

        (RR(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
__invert__ksics+t||||����fd�}|S(s!produce a generic operator function.

        e.g.::

          somecolumn.op("*")(5)

        produces::

          somecolumn * 5

        This function can also be used to make bitwise operators explicit. For
        example::

          somecolumn.op('&')(0xff)

        is a bitwise AND of the value in ``somecolumn``.

        :param operator: a string which will be output as the infix operator
          between this element and the expression passed to the
          generated function.

        :param precedence: precedence to apply to the operator, when
         parenthesizing expressions.  A lower number will cause the expression
         to be parenthesized when applied against another operator with
         higher precedence.  The default value of ``0`` is lower than all
         operators except for the comma (``,``) and ``AS`` operators.
         A value of 100 will be higher or equal to all operators, and -100
         will be lower than or equal to all operators.

        :param is_comparison: if True, the operator will be considered as a
         "comparison" operator, that is which evaluates to a boolean
         true/false value, like ``==``, ``>``, etc.  This flag should be set
         so that ORM relationships can establish that the operator is a
         comparison operator when used in a custom join condition.

         .. versionadded:: 0.9.2 - added the
            :paramref:`.Operators.op.is_comparison` flag.

        :param return_type: a :class:`.TypeEngine` class or object that will
          force the return type of an expression produced by this operator
          to be of that type.   By default, operators that specify
          :paramref:`.Operators.op.is_comparison` will resolve to
          :class:`.Boolean`, and those that do not will be of the same
          type as the left-hand operand.

          .. versionadded:: 1.2.0b3 - added the
             :paramref:`.Operators.op.return_type` argument.

        .. seealso::

            :ref:`types_operators`

            :ref:`relationship_custom_operator`

        cs
��|�S(N((R(toperatorR(sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytagainst�s(t	custom_op(Rtopstringt
precedencet
is_comparisontreturn_typeR((RRsK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytop|s:cCs|j|d|dt�S(s+Return a custom boolean operator.

        This method is shorthand for calling
        :meth:`.Operators.op` and passing the
        :paramref:`.Operators.op.is_comparison`
        flag with True.

        .. versionadded:: 1.2.0b3

        .. seealso::

            :meth:`.Operators.op`

        R R!(R#tTrue(RRR ((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytbool_op�scOstt|���dS(s3Operate on an argument.

        This is the lowest level of operation, raises
        :class:`NotImplementedError` by default.

        Overriding this on a subclass can allow common
        behavior to be applied to all operations.
        For example, overriding :class:`.ColumnOperators`
        to apply ``func.lower()`` to the left and right
        side::

            class MyComparator(ColumnOperators):
                def operate(self, op, other):
                    return op(func.lower(self), func.lower(other))

        :param op:  Operator callable.
        :param \*other: the 'other' side of the operation. Will
         be a single scalar for most operations.
        :param \**kwargs: modifiers.  These may be passed by special
         operators such as :meth:`ColumnOperators.contains`.


        N(tNotImplementedErrortstr(RR#Rtkwargs((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR�scKstt|���dS(sXReverse operate on an argument.

        Usage is the same as :meth:`operate`.

        N(R&R'(RR#RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytreverse_operate�s(N(
t__name__t
__module__t__doc__t	__slots__RRRtFalsetNoneR#R%RR)(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR*s
			@	RcBsGeZdZdZdedeed�Zd�Zd�Zd�ZRS(s�Represent a 'custom' operator.

    :class:`.custom_op` is normally instantiated when the
    :meth:`.Operators.op` or :meth:`.Operators.bool_op` methods
    are used to create a custom operator callable.  The class can also be
    used directly when programmatically constructing expressions.   E.g.
    to represent the "factorial" operation::

        from sqlalchemy.sql import UnaryExpression
        from sqlalchemy.sql import operators
        from sqlalchemy import Numeric

        unary = UnaryExpression(table.c.somecolumn,
                modifier=operators.custom_op("!"),
                type_=Numeric)


    .. seealso::

        :meth:`.Operators.op`

        :meth:`.Operators.bool_op`

    RicCsO||_||_||_||_||_|rB|j|�nd|_dS(N(RR R!tnatural_self_precedentteager_groupingt_to_instanceR/R"(RRR R!R"R0R1((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__init__
s						cCst|t�o|j|jkS(N(t
isinstanceRR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__eq__scCs
t|�S(N(tid(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__hash__"scKs|j|||�S(N(R(Rtlefttrighttkw((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__call__%sN(	R*R+R,R.R/R3R5R7R;(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR�s		tColumnOperatorscBs�eZdZd0Zd1Zd�Zd�Zej	Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd1d�Zd1d�Zd�Zd�Zd1d�Zd1d�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*d$�Z+e,d%�Z-d&�Z.d'�Z/d(�Z0d)�Z1d*�Z2d+�Z3d,�Z4d-�Z5d.�Z6d/�Z7RS(2sDefines boolean, comparison, and other operators for
    :class:`.ColumnElement` expressions.

    By default, all methods call down to
    :meth:`.operate` or :meth:`.reverse_operate`,
    passing in the appropriate operator function from the
    Python builtin ``operator`` module or
    a SQLAlchemy-specific operator function from
    :mod:`sqlalchemy.expression.operators`.   For example
    the ``__eq__`` function::

        def __eq__(self, other):
            return self.operate(operators.eq, other)

    Where ``operators.eq`` is essentially::

        def eq(a, b):
            return a == b

    The core column expression unit :class:`.ColumnElement`
    overrides :meth:`.Operators.operate` and others
    to return further :class:`.ColumnElement` constructs,
    so that the ``==`` operation above is replaced by a clause
    construct.

    .. seealso::

        :ref:`types_operators`

        :attr:`.TypeEngine.comparator_factory`

        :class:`.ColumnOperators`

        :class:`.PropComparator`

    cCs|jt|�S(sdImplement the ``<`` operator.

        In a column context, produces the clause ``a < b``.

        (RR
(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__lt__TscCs|jt|�S(sfImplement the ``<=`` operator.

        In a column context, produces the clause ``a <= b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__le__\scCs|jt|�S(s�Implement the ``==`` operator.

        In a column context, produces the clause ``a = b``.
        If the target is ``None``, produces ``a IS NULL``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR5fscCs|jt|�S(s�Implement the ``!=`` operator.

        In a column context, produces the clause ``a != b``.
        If the target is ``None``, produces ``a IS NOT NULL``.

        (RR
(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__ne__oscCs|jt|�S(s�Implement the ``IS DISTINCT FROM`` operator.

        Renders "a IS DISTINCT FROM b" on most platforms;
        on some such as SQLite may render "a IS NOT b".

        .. versionadded:: 1.1

        (Rtis_distinct_from(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR@xs	cCs|jt|�S(s�Implement the ``IS NOT DISTINCT FROM`` operator.

        Renders "a IS NOT DISTINCT FROM b" on most platforms;
        on some such as SQLite may render "a IS b".

        .. versionadded:: 1.1

        (Rtisnot_distinct_from(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRA�s	cCs|jt|�S(sdImplement the ``>`` operator.

        In a column context, produces the clause ``a > b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__gt__�scCs|jt|�S(sfImplement the ``>=`` operator.

        In a column context, produces the clause ``a >= b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__ge__�scCs
|jt�S(saImplement the ``-`` operator.

        In a column context, produces the clause ``-a``.

        (RR(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__neg__�scCs|jt|�S(N(RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__contains__�scCs|jt|�S(s�Implement the [] operator.

        This can be used by some database-specific types
        such as PostgreSQL ARRAY and HSTORE.

        (RR(Rtindex((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__getitem__�scCs|jt|�S(s�implement the << operator.

        Not used by SQLAlchemy core, this is provided
        for custom operator systems which want to use
        << as an extension point.
        (RR	(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
__lshift__�scCs|jt|�S(s�implement the >> operator.

        Not used by SQLAlchemy core, this is provided
        for custom operator systems which want to use
        >> as an extension point.
        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
__rshift__�scCs|jt|�S(s�Implement the 'concat' operator.

        In a column context, produces the clause ``a || b``,
        or uses the ``concat()`` operator on MySQL.

        (Rt	concat_op(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytconcat�scCs|jt|d|�S(s�Implement the ``like`` operator.

        In a column context, produces the expression::

            a LIKE other

        E.g.::

            stmt = select([sometable]).\
                where(sometable.c.column.like("%foobar%"))

        :param other: expression to be compared
        :param escape: optional escape character, renders the ``ESCAPE``
          keyword, e.g.::

            somecolumn.like("foo/%bar", escape="/")

        .. seealso::

            :meth:`.ColumnOperators.ilike`

        tescape(Rtlike_op(RRRL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytlike�scCs|jt|d|�S(s�Implement the ``ilike`` operator, e.g. case insensitive LIKE.

        In a column context, produces an expression either of the form::

            lower(a) LIKE lower(other)

        Or on backends that support the ILIKE operator::

            a ILIKE other

        E.g.::

            stmt = select([sometable]).\
                where(sometable.c.column.ilike("%foobar%"))

        :param other: expression to be compared
        :param escape: optional escape character, renders the ``ESCAPE``
          keyword, e.g.::

            somecolumn.ilike("foo/%bar", escape="/")

        .. seealso::

            :meth:`.ColumnOperators.like`

        RL(Rtilike_op(RRRL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytilike�scCs|jt|�S(s�
Implement the ``in`` operator.

        In a column context, produces the clause ``column IN <other>``.

        The given parameter ``other`` may be:

        * A list of literal values, e.g.::

            stmt.where(column.in_([1, 2, 3]))

          In this calling form, the list of items is converted to a set of
          bound parameters the same length as the list given::

            WHERE COL IN (?, ?, ?)

        * An empty list, e.g.::

            stmt.where(column.in_([]))

          In this calling form, the expression renders a "false" expression,
          e.g.::

            WHERE 1 != 1

          This "false" expression has historically had different behaviors
          in older SQLAlchemy versions, see
          :paramref:`.create_engine.empty_in_strategy` for behavioral options.

          .. versionchanged:: 1.2 simplified the behavior of "empty in"
             expressions

        * A bound parameter, e.g. :func:`.bindparam`, may be used if it
          includes the :paramref:`.bindparam.expanding` flag::

            stmt.where(column.in_(bindparam('value', expanding=True)))

          In this calling form, the expression renders a special non-SQL
          placeholder expression that looks like::

            WHERE COL IN ([EXPANDING_value])

          This placeholder expression is intercepted at statement execution
          time to be converted into the variable number of bound parameter
          form illustrated earlier.   If the statement were executed as::

            connection.execute(stmt, {"value": [1, 2, 3]})

          The database would be passed a bound parameter for each value::

            WHERE COL IN (?, ?, ?)

          .. versionadded:: 1.2 added "expanding" bound parameters

          If an empty list is passed, a special "empty list" expression,
          which is specific to the database in use, is rendered.  On
          SQLite this would be::

            WHERE COL IN (SELECT 1 FROM (SELECT 1) WHERE 1!=1)

          .. versionadded:: 1.3 "expanding" bound parameters now support
             empty lists

        * a :func:`.select` construct, which is usually a correlated
          scalar select::

            stmt.where(
                column.in_(
                    select([othertable.c.y]).
                    where(table.c.x == othertable.c.x)
                )
            )

          In this calling form, :meth:`.ColumnOperators.in_` renders as given::

            WHERE COL IN (SELECT othertable.y
            FROM othertable WHERE othertable.x = table.x)

        :param other: a list of literals, a :func:`.select` construct,
         or a :func:`.bindparam` construct that includes the
         :paramref:`.bindparam.expanding` flag set to True.

        (Rtin_op(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytin_sScCs|jt|�S(s�implement the ``NOT IN`` operator.

        This is equivalent to using negation with
        :meth:`.ColumnOperators.in_`, i.e. ``~x.in_(y)``.

        In the case that ``other`` is an empty sequence, the compiler
        produces an "empty not in" expression.   This defaults to the
        expression "1 = 1" to produce true in all cases.  The
        :paramref:`.create_engine.empty_in_strategy` may be used to
        alter this behavior.

        .. versionchanged:: 1.2  The :meth:`.ColumnOperators.in_` and
           :meth:`.ColumnOperators.notin_` operators
           now produce a "static" expression for an empty IN sequence
           by default.

        .. seealso::

            :meth:`.ColumnOperators.in_`

        (Rtnotin_op(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotin_XscCs|jt|d|�S(s�implement the ``NOT LIKE`` operator.

        This is equivalent to using negation with
        :meth:`.ColumnOperators.like`, i.e. ``~x.like(y)``.

        .. seealso::

            :meth:`.ColumnOperators.like`

        RL(Rt
notlike_op(RRRL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotlikepscCs|jt|d|�S(s�implement the ``NOT ILIKE`` operator.

        This is equivalent to using negation with
        :meth:`.ColumnOperators.ilike`, i.e. ``~x.ilike(y)``.

        .. seealso::

            :meth:`.ColumnOperators.ilike`

        RL(Rtnotilike_op(RRRL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotilike}scCs|jt|�S(sVImplement the ``IS`` operator.

        Normally, ``IS`` is generated automatically when comparing to a
        value of ``None``, which resolves to ``NULL``.  However, explicit
        usage of ``IS`` may be desirable if comparing to boolean values
        on certain platforms.

        .. seealso:: :meth:`.ColumnOperators.isnot`

        (Rtis_(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRY�scCs|jt|�S(s`Implement the ``IS NOT`` operator.

        Normally, ``IS NOT`` is generated automatically when comparing to a
        value of ``None``, which resolves to ``NULL``.  However, explicit
        usage of ``IS NOT`` may be desirable if comparing to boolean values
        on certain platforms.

        .. seealso:: :meth:`.ColumnOperators.is_`

        (Rtisnot(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRZ�scKs|jt||�S(s�Implement the ``startswith`` operator.

        Produces a LIKE expression that tests against a match for the start
        of a string value::

            column LIKE <other> || '%'

        E.g.::

            stmt = select([sometable]).\
                where(sometable.c.column.startswith("foobar"))

        Since the operator uses ``LIKE``, wildcard characters
        ``"%"`` and ``"_"`` that are present inside the <other> expression
        will behave like wildcards as well.   For literal string
        values, the :paramref:`.ColumnOperators.startswith.autoescape` flag
        may be set to ``True`` to apply escaping to occurrences of these
        characters within the string value so that they match as themselves
        and not as wildcard characters.  Alternatively, the
        :paramref:`.ColumnOperators.startswith.escape` parameter will establish
        a given character as an escape character which can be of use when
        the target expression is not a literal string.

        :param other: expression to be compared.   This is usually a plain
          string value, but can also be an arbitrary SQL expression.  LIKE
          wildcard characters ``%`` and ``_`` are not escaped by default unless
          the :paramref:`.ColumnOperators.startswith.autoescape` flag is
          set to True.

        :param autoescape: boolean; when True, establishes an escape character
          within the LIKE expression, then applies it to all occurrences of
          ``"%"``, ``"_"`` and the escape character itself within the
          comparison value, which is assumed to be a literal string and not a
          SQL expression.

          An expression such as::

            somecolumn.startswith("foo%bar", autoescape=True)

          Will render as::

            somecolumn LIKE :param || '%' ESCAPE '/'

          With the value of :param as ``"foo/%bar"``.

          .. versionadded:: 1.2

          .. versionchanged:: 1.2.0 The
            :paramref:`.ColumnOperators.startswith.autoescape` parameter is
             now a simple boolean rather than a character; the escape
             character itself is also escaped, and defaults to a forwards
             slash, which itself can be customized using the
             :paramref:`.ColumnOperators.startswith.escape` parameter.

        :param escape: a character which when given will render with the
          ``ESCAPE`` keyword to establish that character as the escape
          character.  This character can then be placed preceding occurrences
          of ``%`` and ``_`` to allow them to act as themselves and not
          wildcard characters.

          An expression such as::

            somecolumn.startswith("foo/%bar", escape="^")

          Will render as::

            somecolumn LIKE :param || '%' ESCAPE '^'

          The parameter may also be combined with
          :paramref:`.ColumnOperators.startswith.autoescape`::

            somecolumn.startswith("foo%bar^bat", escape="^", autoescape=True)

          Where above, the given literal parameter will be converted to
          ``"foo^%bar^^bat"`` before being passed to the database.

        .. seealso::

            :meth:`.ColumnOperators.endswith`

            :meth:`.ColumnOperators.contains`

            :meth:`.ColumnOperators.like`

        (Rt
startswith_op(RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
startswith�sVcKs|jt||�S(s�Implement the 'endswith' operator.

        Produces a LIKE expression that tests against a match for the end
        of a string value::

            column LIKE '%' || <other>

        E.g.::

            stmt = select([sometable]).\
                where(sometable.c.column.endswith("foobar"))

        Since the operator uses ``LIKE``, wildcard characters
        ``"%"`` and ``"_"`` that are present inside the <other> expression
        will behave like wildcards as well.   For literal string
        values, the :paramref:`.ColumnOperators.endswith.autoescape` flag
        may be set to ``True`` to apply escaping to occurrences of these
        characters within the string value so that they match as themselves
        and not as wildcard characters.  Alternatively, the
        :paramref:`.ColumnOperators.endswith.escape` parameter will establish
        a given character as an escape character which can be of use when
        the target expression is not a literal string.

        :param other: expression to be compared.   This is usually a plain
          string value, but can also be an arbitrary SQL expression.  LIKE
          wildcard characters ``%`` and ``_`` are not escaped by default unless
          the :paramref:`.ColumnOperators.endswith.autoescape` flag is
          set to True.

        :param autoescape: boolean; when True, establishes an escape character
          within the LIKE expression, then applies it to all occurrences of
          ``"%"``, ``"_"`` and the escape character itself within the
          comparison value, which is assumed to be a literal string and not a
          SQL expression.

          An expression such as::

            somecolumn.endswith("foo%bar", autoescape=True)

          Will render as::

            somecolumn LIKE '%' || :param ESCAPE '/'

          With the value of :param as ``"foo/%bar"``.

          .. versionadded:: 1.2

          .. versionchanged:: 1.2.0 The
            :paramref:`.ColumnOperators.endswith.autoescape` parameter is
             now a simple boolean rather than a character; the escape
             character itself is also escaped, and defaults to a forwards
             slash, which itself can be customized using the
             :paramref:`.ColumnOperators.endswith.escape` parameter.

        :param escape: a character which when given will render with the
          ``ESCAPE`` keyword to establish that character as the escape
          character.  This character can then be placed preceding occurrences
          of ``%`` and ``_`` to allow them to act as themselves and not
          wildcard characters.

          An expression such as::

            somecolumn.endswith("foo/%bar", escape="^")

          Will render as::

            somecolumn LIKE '%' || :param ESCAPE '^'

          The parameter may also be combined with
          :paramref:`.ColumnOperators.endswith.autoescape`::

            somecolumn.endswith("foo%bar^bat", escape="^", autoescape=True)

          Where above, the given literal parameter will be converted to
          ``"foo^%bar^^bat"`` before being passed to the database.

        .. seealso::

            :meth:`.ColumnOperators.startswith`

            :meth:`.ColumnOperators.contains`

            :meth:`.ColumnOperators.like`

        (Rtendswith_op(RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytendswith�sVcKs|jt||�S(s�Implement the 'contains' operator.

        Produces a LIKE expression that tests against a match for the middle
        of a string value::

            column LIKE '%' || <other> || '%'

        E.g.::

            stmt = select([sometable]).\
                where(sometable.c.column.contains("foobar"))

        Since the operator uses ``LIKE``, wildcard characters
        ``"%"`` and ``"_"`` that are present inside the <other> expression
        will behave like wildcards as well.   For literal string
        values, the :paramref:`.ColumnOperators.contains.autoescape` flag
        may be set to ``True`` to apply escaping to occurrences of these
        characters within the string value so that they match as themselves
        and not as wildcard characters.  Alternatively, the
        :paramref:`.ColumnOperators.contains.escape` parameter will establish
        a given character as an escape character which can be of use when
        the target expression is not a literal string.

        :param other: expression to be compared.   This is usually a plain
          string value, but can also be an arbitrary SQL expression.  LIKE
          wildcard characters ``%`` and ``_`` are not escaped by default unless
          the :paramref:`.ColumnOperators.contains.autoescape` flag is
          set to True.

        :param autoescape: boolean; when True, establishes an escape character
          within the LIKE expression, then applies it to all occurrences of
          ``"%"``, ``"_"`` and the escape character itself within the
          comparison value, which is assumed to be a literal string and not a
          SQL expression.

          An expression such as::

            somecolumn.contains("foo%bar", autoescape=True)

          Will render as::

            somecolumn LIKE '%' || :param || '%' ESCAPE '/'

          With the value of :param as ``"foo/%bar"``.

          .. versionadded:: 1.2

          .. versionchanged:: 1.2.0 The
            :paramref:`.ColumnOperators.contains.autoescape` parameter is
             now a simple boolean rather than a character; the escape
             character itself is also escaped, and defaults to a forwards
             slash, which itself can be customized using the
             :paramref:`.ColumnOperators.contains.escape` parameter.

        :param escape: a character which when given will render with the
          ``ESCAPE`` keyword to establish that character as the escape
          character.  This character can then be placed preceding occurrences
          of ``%`` and ``_`` to allow them to act as themselves and not
          wildcard characters.

          An expression such as::

            somecolumn.contains("foo/%bar", escape="^")

          Will render as::

            somecolumn LIKE '%' || :param || '%' ESCAPE '^'

          The parameter may also be combined with
          :paramref:`.ColumnOperators.contains.autoescape`::

            somecolumn.contains("foo%bar^bat", escape="^", autoescape=True)

          Where above, the given literal parameter will be converted to
          ``"foo^%bar^^bat"`` before being passed to the database.

        .. seealso::

            :meth:`.ColumnOperators.startswith`

            :meth:`.ColumnOperators.endswith`

            :meth:`.ColumnOperators.like`


        (Rtcontains_op(RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRTsWcKs|jt||�S(sYImplements a database-specific 'match' operator.

        :meth:`~.ColumnOperators.match` attempts to resolve to
        a MATCH-like function or operator provided by the backend.
        Examples include:

        * PostgreSQL - renders ``x @@ to_tsquery(y)``
        * MySQL - renders ``MATCH (x) AGAINST (y IN BOOLEAN MODE)``
        * Oracle - renders ``CONTAINS(x, y)``
        * other backends may provide special implementations.
        * Backends without any special implementation will emit
          the operator as "MATCH".  This is compatible with SQLite, for
          example.

        (Rtmatch_op(RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytmatch�scCs
|jt�S(sMProduce a :func:`~.expression.desc` clause against the
        parent object.(Rtdesc_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytdesc�scCs
|jt�S(sLProduce a :func:`~.expression.asc` clause against the
        parent object.(Rtasc_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytasc�scCs
|jt�S(sSProduce a :func:`~.expression.nullsfirst` clause against the
        parent object.(Rt
nullsfirst_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
nullsfirst�scCs
|jt�S(sRProduce a :func:`~.expression.nullslast` clause against the
        parent object.(Rtnullslast_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt	nullslast�scCs|jt|�S(s�Produce a :func:`~.expression.collate` clause against
        the parent object, given the collation string.

        .. seealso::

            :func:`~.expression.collate`

        (Rtcollate(Rt	collation((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRj�s	cCs|jt|�S(saImplement the ``+`` operator in reverse.

        See :meth:`.ColumnOperators.__add__`.

        (R)R(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__radd__�scCs|jt|�S(saImplement the ``-`` operator in reverse.

        See :meth:`.ColumnOperators.__sub__`.

        (R)R(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__rsub__�scCs|jt|�S(saImplement the ``*`` operator in reverse.

        See :meth:`.ColumnOperators.__mul__`.

        (R)R(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__rmul__�scCs|jt|�S(saImplement the ``/`` operator in reverse.

        See :meth:`.ColumnOperators.__div__`.

        (R)R(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__rdiv__�scCs|jt|�S(saImplement the ``%`` operator in reverse.

        See :meth:`.ColumnOperators.__mod__`.

        (R)R(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__rmod__�scCs|jt||d|�S(s{Produce a :func:`~.expression.between` clause against
        the parent object, given the lower and upper range.

        t	symmetric(Rt
between_op(RtclefttcrightRq((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytbetweenscCs
|jt�S(s[Produce a :func:`~.expression.distinct` clause against the
        parent object.

        (Rtdistinct_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytdistinct
scCs
|jt�S(s�Produce a :func:`~.expression.any_` clause against the
        parent object.

        This operator is only appropriate against a scalar subquery
        object, or for some backends an column expression that is
        against the ARRAY type, e.g.::

            # postgresql '5 = ANY (somearray)'
            expr = 5 == mytable.c.somearray.any_()

            # mysql '5 = ANY (SELECT value FROM table)'
            expr = 5 == select([table.c.value]).as_scalar().any_()

        .. seealso::

            :func:`~.expression.any_` - standalone version

            :func:`~.expression.all_` - ALL operator

        .. versionadded:: 1.1

        (Rtany_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytany_scCs
|jt�S(s�Produce a :func:`~.expression.all_` clause against the
        parent object.

        This operator is only appropriate against a scalar subquery
        object, or for some backends an column expression that is
        against the ARRAY type, e.g.::

            # postgresql '5 = ALL (somearray)'
            expr = 5 == mytable.c.somearray.all_()

            # mysql '5 = ALL (SELECT value FROM table)'
            expr = 5 == select([table.c.value]).as_scalar().all_()

        .. seealso::

            :func:`~.expression.all_` - standalone version

            :func:`~.expression.any_` - ANY operator

        .. versionadded:: 1.1

        (Rtall_op(R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytall_-scCs|jt|�S(s4Implement the ``+`` operator.

        In a column context, produces the clause ``a + b``
        if the parent object has non-string affinity.
        If the parent object has a string affinity,
        produces the concatenation operator, ``a || b`` -
        see :meth:`.ColumnOperators.concat`.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__add__Fs
cCs|jt|�S(sdImplement the ``-`` operator.

        In a column context, produces the clause ``a - b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__sub__RscCs|jt|�S(sdImplement the ``*`` operator.

        In a column context, produces the clause ``a * b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__mul__ZscCs|jt|�S(sdImplement the ``/`` operator.

        In a column context, produces the clause ``a / b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__div__bscCs|jt|�S(sdImplement the ``%`` operator.

        In a column context, produces the clause ``a % b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__mod__jscCs|jt|�S(seImplement the ``//`` operator.

        In a column context, produces the clause ``a / b``.

        (RR(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__truediv__rscCs|jt|�S(sfImplement the ``//`` operator in reverse.

        See :meth:`.ColumnOperators.__truediv__`.

        (R)R(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt__rtruediv__zs(N(8R*R+R,R-R/t	timetupleR=R>RR7R5R?R@RARBRCRDRERGRHRIRKRNRPRRRTRVRXRYRZR\R^RRaRcReRgRiRjRlRmRnRoRpR.RuRwRyR{R|R}R~RR�R�R�(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR<)sf$																						U	

	
	
	X	X	Y																				cCstj|�|S(N(t_commutativeR(tfn((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytcommutative_op�s
cCstj|�|S(N(t_comparisonR(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
comparison_op�s
cCs
t��dS(N(R&(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytfrom_�scCs
t��dS(N(R&(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytfunction_as_comparison_op�scCs
t��dS(N(R&(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytas_�scCs
t��dS(N(R&(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytexists�scCs
t��dS(N(R&(ta((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytistrue�scCs
t��dS(N(R&(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytisfalse�scCs
|j|�S(N(R@(R�tb((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR@�scCs
|j|�S(N(RA(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRA�scCs
|j|�S(N(RY(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRY�scCs
|j|�S(N(RZ(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRZ�scCs
|j|�S(N(Rj(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRj�scCs|j|�|�S(N(R#(R�RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR#�scCs|j|d|�S(NRL(RN(R�R�RL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRM�scCs|j|d|�S(NRL(RV(R�R�RL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRU�scCs|j|d|�S(NRL(RP(R�R�RL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRO�scCs|j|d|�S(NRL(RX(R�R�RL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRW�scCs|j||d|�S(NRq(Ru(R�R�tcRq((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRr�scCs|j||d|�S(NRq(t
notbetween(R�R�R�Rq((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
notbetween_op�scCs
|j|�S(N(RR(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRQ�scCs
|j|�S(N(RT(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRS�scCs
|j�S(N(Rw(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRv�scCs
|j�S(N(Ry(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRx�scCs
|j�S(N(R{(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRz�scCs�|r�|tk	r"tjd�n|dkr7d}nt|tjj�s[td��n|dkr�|j|||�}n|jd|d�jd|d�}n||d|�S(Ns;The autoescape parameter is now a simple boolean True/Falset/s*String value expected when autoescape=Truet%t_RL(R�R�(	R$RtwarnR/R4tcompattstring_typest	TypeErrortreplace(R�RRLt
autoescape((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt_escaped_like_impl�s
	)cCst|j|||�S(N(R�R\(R�R�RLR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR[scCst|j|||�S(N(R�R\(R�R�RLR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotstartswith_opscCst|j|||�S(N(R�R^(R�R�RLR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR]scCst|j|||�S(N(R�R^(R�R�RLR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotendswith_opscCst|j|||�S(N(R�R(R�R�RLR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR_"scCst|j|||�S(N(R�R(R�R�RLR�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotcontains_op'scKs|j||�S(N(Ra(R�R�R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR`,scKs|j||�S(N(tnotmatch(R�R�R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytnotmatch_op1scCs
t��dS(N(R&(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytcomma_op6scCs
t��dS(N(R&(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytempty_in_op:scCs
t��dS(N(R&(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytempty_notin_op?scCs
t��dS(N(R&(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt	filter_opDscCs
|j|�S(N(RK(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRJHscCs
|j�S(N(Rc(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRbLscCs
|j�S(N(Re(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRdPscCs
|j�S(N(Rg(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRfTscCs
|j�S(N(Ri(R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyRhXscCs
t��dS(N(R&(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytjson_getitem_op\scCs
t��dS(N(R&(R�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytjson_path_getitem_op`scCs"|tkp!t|t�o!|jS(N(R�R4RR!(R#((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyR!dscCs
|tkS(N(R�(R#((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytis_commutativehscCs|ttttfkS(N(RdRbRfRh(R#((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytis_ordering_modifierlscCs"|tkp!t|t�o!|jS(N(t_natural_self_precedentR4RR0(R#((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytis_natural_self_precedentpscCst|�p|tkS(N(R!t	_booleans(R#((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt
is_boolean{scCstj||�S(s[rotate a comparison operator 180 degrees.

    Note this is not the same as negation.

    (t_mirrortget(R#((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytmirror�st_asboolt	canonicali����t	_smallesti����t_largestidiiiiiiiicCsZ||krt|�rtStj|t|dt��tj|t|dt��kSdS(NR (R�R.t_PRECEDENCER�tgetattrR�R�(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pytis_precedent�s
N(`R,RRRRRRRRRRR	R
RRR
RRRRRtRtpy2kRtobjectRRR<R�R�R�R�R�R�R�R�R�R�R@RARYRZRjR#R/RMRURORWR.RrR�RQRSRvRxRzR�R[R�R]R�R_R�R`R�R�R�R�R�RJRbRdRfRhR�R�R!R�R�R�R�R�R�R�tuniont
differencet_associativeR�tsymbolR�R�R�R�R�(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/operators.pyt<module>s:	�8���]																											"		'


Zerion Mini Shell 1.0