
    -h                     2   S SK Jr  Sr " S S\5      r " S S\\R                  5      r " S S\\R                  5      r " S	 S
\\R                  5      r	 " S S\\R                  5      r
 " S S\\R                  5      r " S S\\R                  5      rg)   )types)	INT4RANGE	INT8RANGENUMRANGEc                   V    \ rS rSrSr " S S\R                  R                  5      rSr	g)RangeOperators   aF  
This mixin provides functionality for the Range Operators
listed in the Range Operators table of the `PostgreSQL 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.

__ https://www.postgresql.org/docs/current/static/functions-range.html

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

c                   j   ^  \ rS rSrSrU 4S jrS rS rS rS r	\	r
S r\rS	 rS
 rS rS rSrU =r$ )!RangeOperators.comparator_factory   z-Define comparison operations for range types.c                    > Uc  [         [        R                  U ]  U5      $ U R                  R                  SSS9" U5      $ )z<Boolean expression. Returns true if two ranges are not equalz<>Tis_comparison)superr   comparator_factory__ne__exprop)selfother	__class__s     zC:\Users\ROHAN GUPTA\OneDrive\Desktop\mathbuddy-assessment\venv\Lib\site-packages\sqlalchemy/dialects/postgresql/ranges.pyr   (RangeOperators.comparator_factory.__ne__!   sC    }^>>L  yy||D|=eDD    c                 B    U R                   R                  SSS9" U5      $ )zBoolean expression. Returns true if the right hand operand,
which can be an element or a range, is contained within the
column.

kwargs may be ignored by this operator but are required for API
conformance.
z@>Tr   r   r   )r   r   kws      r   contains*RangeOperators.comparator_factory.contains*   s      99<<D<9%@@r   c                 B    U R                   R                  SSS9" U5      $ )z[Boolean expression. Returns true if the column is contained
within the right hand operand.
z<@Tr   r   r   r   s     r   contained_by.RangeOperators.comparator_factory.contained_by4         99<<D<9%@@r   c                 B    U R                   R                  SSS9" U5      $ )zlBoolean expression. Returns true if the column overlaps
(has points in common with) the right hand operand.
z&&Tr   r   r!   s     r   overlaps*RangeOperators.comparator_factory.overlaps:   r$   r   c                 B    U R                   R                  SSS9" U5      $ )z[Boolean expression. Returns true if the column is strictly
left of the right hand operand.
z<<Tr   r   r!   s     r   strictly_left_of2RangeOperators.comparator_factory.strictly_left_of@   r$   r   c                 B    U R                   R                  SSS9" U5      $ )z\Boolean expression. Returns true if the column is strictly
right of the right hand operand.
z>>Tr   r   r!   s     r   strictly_right_of3RangeOperators.comparator_factory.strictly_right_ofH   r$   r   c                 B    U R                   R                  SSS9" U5      $ )zoBoolean expression. Returns true if the range in the column
does not extend right of the range in the operand.
z&<Tr   r   r!   s     r   not_extend_right_of5RangeOperators.comparator_factory.not_extend_right_ofP   r$   r   c                 B    U R                   R                  SSS9" U5      $ )znBoolean expression. Returns true if the range in the column
does not extend left of the range in the operand.
z&>Tr   r   r!   s     r   not_extend_left_of4RangeOperators.comparator_factory.not_extend_left_ofV   r$   r   c                 B    U R                   R                  SSS9" U5      $ )zeBoolean expression. Returns true if the range in the column
is adjacent to the range in the operand.
z-|-Tr   r   r!   s     r   adjacent_to-RangeOperators.comparator_factory.adjacent_to\   s      99<<T<:5AAr   c                 D    U R                   R                  S5      " U5      $ )zyRange expression. Returns the union of the two ranges.
Will raise an exception if the resulting range is not
contiguous.
+r   r!   s     r   __add__)RangeOperators.comparator_factory.__add__b   s    
 99<<$U++r    )__name__
__module____qualname____firstlineno____doc__r   r   r"   r&   r)   
__lshift__r,   
__rshift__r/   r2   r5   r9   __static_attributes____classcell__)r   s   @r   r   r      sT    ;	E	A	A	A	A &
	A '
	A	A	B	, 	,r   r   r;   N)
r<   r=   r>   r?   r@   sqltypesConcatenable
Comparatorr   rC   r;   r   r   r   r      s!    I,X22== I,r   r   c                       \ rS rSrSrS rSrg)r   j   z(Represent the PostgreSQL INT4RANGE type.r;   Nr<   r=   r>   r?   r@   __visit_name__rC   r;   r   r   r   r   j   
    2 Nr   r   c                       \ rS rSrSrS rSrg)r   p   z(Represent the PostgreSQL INT8RANGE type.r;   NrJ   r;   r   r   r   r   p   rL   r   r   c                       \ rS rSrSrS rSrg)r   v   z'Represent the PostgreSQL NUMRANGE type.r;   NrJ   r;   r   r   r   r   v   s
    1Nr   r   c                       \ rS rSrSrS rSrg)	DATERANGE|   z(Represent the PostgreSQL DATERANGE type.r;   NrJ   r;   r   r   rR   rR   |   rL   r   rR   c                       \ rS rSrSrS rSrg)TSRANGE   z&Represent the PostgreSQL TSRANGE type.r;   NrJ   r;   r   r   rU   rU      s
    0Nr   rU   c                       \ rS rSrSrS rSrg)	TSTZRANGE   z(Represent the PostgreSQL TSTZRANGE type.r;   NrJ   r;   r   r   rX   rX      rL   r   rX   N) r   rE   __all__objectr   
TypeEnginer   r   r   rR   rU   rX   r;   r   r   <module>r^      s    " 1Y,V Y,x! 3 3 !! 3 3 ! ~x22  ! 3 3 !nh11 ! 3 3 !r   