o
    ¹i~  ã                   @   sœ   d dl mZ dZG dd„ deƒZG dd„ deejƒZG dd„ deejƒZG d	d
„ d
eejƒZ	G dd„ deejƒZ
G dd„ deejƒZG dd„ deejƒZdS )é   )Útypes)Ú	INT4RANGEÚ	INT8RANGEÚNUMRANGEc                   @   s$   e Zd ZdZG dd„ dejjƒZdS )ÚRangeOperatorsaI  
    This mixin provides functionality for the Range Operators
    listed in Table 9-44 of the `postgres documentation`__ for Range
    Functions and Operators. It is used by all the range types
    provided in the ``postgres`` dialect and can likely be used for
    any range types you create yourself.

    __ http://www.postgresql.org/docs/devel/static/functions-range.html

    No extra support is provided for the Range Functions listed in
    Table 9-45 of the postgres documentation. For these, the normal
    :func:`~sqlalchemy.sql.expression.func` object should be used.

    c                       sp   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Zd
d„ ZeZ	dd„ Z
e
Zdd„ Zdd„ Zdd„ Zdd„ Z‡  ZS )z!RangeOperators.comparator_factoryz-Define comparison operations for range types.c                    s*   |du rt tj| ƒ |¡S | j d¡|ƒS )z<Boolean expression. Returns true if two ranges are not equalNz<>)Úsuperr   Úcomparator_factoryÚ__ne__ÚexprÚop©ÚselfÚother©Ú	__class__© ú`/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/ranges.pyr	       s
   ÿz(RangeOperators.comparator_factory.__ne__c                 K   ó   | j  d¡|ƒS )z¤Boolean expression. Returns true if the right hand operand,
            which can be an element or a range, is contained within the
            column.
            z@>©r
   r   )r   r   Úkwr   r   r   Úcontains)   ó   z*RangeOperators.comparator_factory.containsc                 C   r   )zsBoolean expression. Returns true if the column is contained
            within the right hand operand.
            z<@r   r   r   r   r   Úcontained_by0   ó   z.RangeOperators.comparator_factory.contained_byc                 C   r   )z„Boolean expression. Returns true if the column overlaps
            (has points in common with) the right hand operand.
            z&&r   r   r   r   r   Úoverlaps6   r   z*RangeOperators.comparator_factory.overlapsc                 C   r   )zsBoolean expression. Returns true if the column is strictly
            left of the right hand operand.
            z<<r   r   r   r   r   Ústrictly_left_of<   r   z2RangeOperators.comparator_factory.strictly_left_ofc                 C   r   )ztBoolean expression. Returns true if the column is strictly
            right of the right hand operand.
            z>>r   r   r   r   r   Ústrictly_right_ofD   r   z3RangeOperators.comparator_factory.strictly_right_ofc                 C   r   )z‡Boolean expression. Returns true if the range in the column
            does not extend right of the range in the operand.
            z&<r   r   r   r   r   Únot_extend_right_ofL   r   z5RangeOperators.comparator_factory.not_extend_right_ofc                 C   r   )z†Boolean expression. Returns true if the range in the column
            does not extend left of the range in the operand.
            z&>r   r   r   r   r   Únot_extend_left_ofR   r   z4RangeOperators.comparator_factory.not_extend_left_ofc                 C   r   )z}Boolean expression. Returns true if the range in the column
            is adjacent to the range in the operand.
            z-|-r   r   r   r   r   Úadjacent_toX   r   z-RangeOperators.comparator_factory.adjacent_toc                 C   r   )zœRange expression. Returns the union of the two ranges.
            Will raise an exception if the resulting range is not
            contigous.
            ú+r   r   r   r   r   Ú__add__^   r   z)RangeOperators.comparator_factory.__add__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   r   r   r   Ú
__lshift__r   Ú
__rshift__r   r   r   r!   Ú__classcell__r   r   r   r   r      s    	r   N)r"   r#   r$   r%   ÚsqltypesÚConcatenableÚ
Comparatorr   r   r   r   r   r      s    r   c                   @   ó   e Zd ZdZd ZdS )r   z.Represent the PostgreSQL INT4RANGE type.

    N©r"   r#   r$   r%   Ú__visit_name__r   r   r   r   r   f   ó    r   c                   @   r,   )r   z.Represent the PostgreSQL INT8RANGE type.

    Nr-   r   r   r   r   r   n   r/   r   c                   @   r,   )r   z-Represent the PostgreSQL NUMRANGE type.

    Nr-   r   r   r   r   r   v   r/   r   c                   @   r,   )Ú	DATERANGEz.Represent the PostgreSQL DATERANGE type.

    Nr-   r   r   r   r   r0   ~   r/   r0   c                   @   r,   )ÚTSRANGEz,Represent the PostgreSQL TSRANGE type.

    Nr-   r   r   r   r   r1   †   r/   r1   c                   @   r,   )Ú	TSTZRANGEz.Represent the PostgreSQL TSTZRANGE type.

    Nr-   r   r   r   r   r2   Ž   r/   r2   N)Ú r   r)   Ú__all__Úobjectr   Ú
TypeEnginer   r   r   r0   r1   r2   r   r   r   r   Ú<module>   s   Y