U a@sddlmZdZGdddeZGdddeejZGdddeejZGd d d eejZ Gd d d eejZ Gd ddeejZ GdddeejZ dS))types) INT4RANGE INT8RANGENUMRANGEc@s$eZdZdZGdddejjZdS)RangeOperatorsaN This mixin provides functionality for the Range Operators listed in Table 9-44 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/devel/static/functions-range.html No extra support is provided for the Range Functions listed in Table 9-45 of the PostgreSQL documentation. For these, the normal :func:`~sqlalchemy.sql.expression.func` object should be used. cspeZdZdZfddZddZddZdd Zd d ZeZ d d Z e Z ddZ ddZ ddZddZZS)z!RangeOperators.comparator_factoryz-Define comparison operations for range types.cs2|dkrttj||S|jjddd|SdS)zTZ is_comparison)superrcomparator_factory__ne__expropselfother __class__fC:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-nyjtotrf\sqlalchemy\dialects\postgresql\ranges.pyr s  z(RangeOperators.comparator_factory.__ne__cKs|jjddd|S)zBoolean expression. Returns true if the right hand operand, which can be an element or a range, is contained within the column. z@>Trr r )rrkwrrrcontains)sz*RangeOperators.comparator_factory.containscCs|jjddd|S)zsBoolean expression. Returns true if the column is contained within the right hand operand. z<@Trrr rrr contained_by0sz.RangeOperators.comparator_factory.contained_bycCs|jjddd|S)zBoolean expression. Returns true if the column overlaps (has points in common with) the right hand operand. z&&Trrr rrroverlaps6sz*RangeOperators.comparator_factory.overlapscCs|jjddd|S)zsBoolean expression. Returns true if the column is strictly left of the right hand operand. z<>Trrr rrrstrictly_right_ofDsz3RangeOperators.comparator_factory.strictly_right_ofcCs|jjddd|S)zBoolean expression. Returns true if the range in the column does not extend right of the range in the operand. z&Trrr rrrnot_extend_left_ofRsz4RangeOperators.comparator_factory.not_extend_left_ofcCs|jjddd|S)z}Boolean expression. Returns true if the range in the column is adjacent to the range in the operand. z-|-Trrr rrr adjacent_toXsz-RangeOperators.comparator_factory.adjacent_tocCs|jd|S)zRange expression. Returns the union of the two ranges. Will raise an exception if the resulting range is not contiguous. +rr rrr__add__^sz)RangeOperators.comparator_factory.__add__)__name__ __module__ __qualname____doc__r rrrr __lshift__r __rshift__rrrr __classcell__rrrrr s r N)r r!r"r#sqltypesZ ConcatenableZ Comparatorr rrrrr src@seZdZdZdZdS)rz(Represent the PostgreSQL INT4RANGE type.Nr r!r"r#Z__visit_name__rrrrrfsrc@seZdZdZdZdS)rz(Represent the PostgreSQL INT8RANGE type.Nr(rrrrrlsrc@seZdZdZdZdS)rz'Represent the PostgreSQL NUMRANGE type.Nr(rrrrrrsrc@seZdZdZdZdS) DATERANGEz(Represent the PostgreSQL DATERANGE type.Nr(rrrrr)xsr)c@seZdZdZdZdS)TSRANGEz&Represent the PostgreSQL TSRANGE type.Nr(rrrrr*~sr*c@seZdZdZdZdS) TSTZRANGEz(Represent the PostgreSQL TSTZRANGE type.Nr(rrrrr+sr+N) rr'__all__objectrZ TypeEnginerrrr)r*r+rrrrs Y