
    ,hҀ                    f   S SK Jr  S SKrS SKJr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SKJ
r
  S S	KJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr   SSK!Jr  SSK"J#r#  SS K$J%r%  SS!K&J'r'  \(       a  SS"K(J)r)  SS#K"J*r*  SS$K"J+r+  \" S%\	S&9r,\'S'   r-\%(       a	  S(S)0r.S*S)0r/O0 r.0 r/\R`                  " SUS+S)0\.D6 " S, S-\\,   5      5       r1 " S. S/\\1\,      5      r2 " S0 S1\ RF                  \,   5      r3 " S2 S3\3\1\,      5      r4 " S4 S5\4\,   5      r5 " S6 S7\3\\1\,         5      r6 " S8 S9\6\,   5      r7 " S: S;\4\8   5      r9 " S< S=\4\8   5      r: " S> S?\4\   5      r; " S@ SA\4\   5      r< " SB SC\4\   5      r= " SD SE\4\   5      r> " SF SG\6\8   5      r? " SH SI\6\8   5      r@ " SJ SK\6\   5      rA " SL SM\6\   5      rB " SN SO\6\   5      rC " SP SQ\6\   5      rDSRrESSrFSVST jrGg)W    )annotationsN)date)datetime)	timedelta)Decimal)Any)cast)Generic)List)Optional)overload)Sequence)Tuple)Type)TYPE_CHECKING)TypeVar)Union   )ADJACENT_TO)CONTAINED_BY)CONTAINS)NOT_EXTEND_LEFT_OF)NOT_EXTEND_RIGHT_OF)OVERLAP)STRICTLY_LEFT_OF)STRICTLY_RIGHT_OF   )types)	operators)
TypeEngine)py310)Literal)ColumnElement)_TE)TypeEngineMixin_T)bound)z()[)z(]z[]slotsTkw_onlyfrozenc                     \ rS rSr% SrSrS\S'    SrS\S'    \(       a+  \	R                  " SS9rS	\S
'   \	R                  " SS9rS\S'   O2\	R                  " S.SS0\D6rS	\S
'   \	R                  " S.SS0\D6rS\S'   \(       d    S/SSS.       S0S jjjrS1S jr\S1S j5       r\S1S j5       r\S1S j5       r\S1S j5       r\S1S j5       r\S1S j5       r\S2S j5       rS3S jrS4S jr S5           S6S jjrS7S jrS8S jrS9S jr\rS8S jr S8S  jr!\!r"S8S! jr#\#r$S8S" jr%S8S# jr&          S:S$ jr'S8S% jr(S;S& jr)S;S' jr*S;S( jr+S;S) jr,S;S* jr-S;S+ jr.S<S, jr/S<S- jr0S.r1g)=Range;   a+  Represent a PostgreSQL range.

E.g.::

    r = Range(10, 50, bounds="()")

The calling style is similar to that of psycopg and psycopg2, in part
to allow easier migration from previous SQLAlchemy versions that used
these objects directly.

:param lower: Lower bound value, or None
:param upper: Upper bound value, or None
:param bounds: keyword-only, optional string value that is one of
 ``"()"``, ``"[)"``, ``"(]"``, ``"[]"``.  Defaults to ``"[)"``.
:param empty: keyword-only, optional bool indicating this is an "empty"
 range

.. versionadded:: 2.0

NOptional[_T]lowerupperr(   )default_BoundsTypeboundsFboolemptyr2   )r4   r6   c               D    U R                   R                  UUUUS.5        g )N)r0   r1   r4   r6   )__dict__update)selfr0   r1   r4   r6   s        ]/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/dialects/postgresql/ranges.py__init__Range.__init__a   s'     MM  ""$"	    c                $    U R                   (       + $ Nr6   r:   s    r;   __bool__Range.__bool__s   s    ::~r>   c                    U R                   $ z$A synonym for the 'empty' attribute.rA   rB   s    r;   isemptyRange.isemptyv        zzr>   c                    U R                   $ rF   rA   rB   s    r;   is_emptyRange.is_empty|   rI   r>   c                &    U R                   S   S:H  $ )z,Return True if the lower bound is inclusive.r   [r4   rB   s    r;   	lower_incRange.lower_inc        {{1~$$r>   c                N    U R                   (       + =(       a    U R                  SL $ )zCReturn True if this range is non-empty and lower bound is
infinite.N)r6   r0   rB   s    r;   	lower_infRange.lower_inf       
 ::~4$**"44r>   c                &    U R                   S   S:H  $ )z,Return True if the upper bound is inclusive.r   ]rO   rB   s    r;   	upper_incRange.upper_inc   rR   r>   c                N    U R                   (       + =(       a    U R                  SL $ )zGReturn True if this range is non-empty and the upper bound is
infinite.N)r6   r1   rB   s    r;   	upper_infRange.upper_inf   rV   r>   c                    [        5       $ r@   )AbstractSingleRangerB   s    r;   __sa_type_engine__Range.__sa_type_engine__   s    "$$r>   c                
   U R                   (       a  gU R                  cD  U R                  SL =(       d/    U R                  S   S:X  a  XR                  :  $ XR                  :*  $ U R                  c/  U R                  S   S:X  a  XR                  :  $ XR                  :  $ U R                  S   S:X  a  XR                  :  OXR                  :  =(       a/    U R                  S   S:X  a  XR                  :  $ XR                  :*  $ )z3Return True if this range contains the given value.FNr   )r   ()r6   r0   r1   r4   r:   values     r;   _contains_valueRange._contains_value   s     ::::::% ;;q>S( 

" jj( :: ;;q>S( 

" jj( {{1~$ JJ**$
 {{1~$ JJ	
 **$	
r>   c                   [        U R                  [        5      (       d  [        U R                  [        5      (       a  g[        U R                  [        5      (       d  [        U R                  [        5      (       a  g[        U R                  [
        5      (       d  [        U R                  [
        5      (       a	  [        SS9$ g)uA   Determine the “step” for this range, if it is a discrete one.r   N)days)
isinstancer0   intr1   r   r   r   rB   s    r;   _get_discrete_stepRange._get_discrete_step   s     djj#&&*TZZ*E*E

H--JJ2
 2

 

D))Z

D-I-I!$$r>   c                ,   US;   nUS;   nXs=L a  c  O  OXg:X  a  gU(       a  S$ S$ Uc  U(       a  S$ S$ Uc  U(       a  S$ S$ X$:X  a  X:X  a  gUS;   nUS;   n	U R                  5       n
U
bD  U(       a  U(       d  X-  nSnOU(       a  X-  nSnU(       a  U	(       d  X:-  nSn	OU	(       a  X:-  nSn	X:  a  gX:  a  gU(       a  gU(       a  U	(       a  gU(       d  U	(       d  Xg:X  a  gU(       a  S$ S$ U(       d  U(       a  S$ S$ U	(       d  U(       a  S$ S$ g)zCompare two range bounds.

Return -1, 0 or 1 respectively when `value1` is less than,
equal to or greater than `value2`.

When `only_value` is ``True``, do not consider the *inclusivity*
of the edges, just their values.
>   rd   rN   r   r   >   rN   rX   TF)rm   )r:   value1bound1value2bound2only_valuesvalue1_is_lower_boundvalue2_is_lower_bound
value1_inc
value2_incsteps              r;   _compare_edgesRange._compare_edges   s;   " !'* 4 &* 4 ##$=2r99^.25A5^-1525  0z)
z)
&&( %!NF!%JNF!&J$!NF!%JNF!&J?_ j
(A 51=2=1q9r92r99r>   c                   [        U[        5      (       d  [        $ U R                  (       a  UR                  (       a  gU R                  UR                  :w  a  gU R                  nU R
                  S   nUR                  nUR
                  S   nU R                  nU R
                  S   nUR                  nUR
                  S   n	U R                  X#XE5      S:H  =(       a    U R                  XgX5      S:H  $ )zpCompare this range to the `other` taking into account
bounds inclusivity, returning ``True`` if they are equal.
TFr   r   )rk   r-   NotImplementedr6   r0   r4   r1   r{   
r:   otherslowerslower_bolowerolower_bsuppersupper_boupperoupper_bs
             r;   __eq__Range.__eq__+  s    
 %''!!::%++ZZ5;;&;;q><<?;;q><<? &CqH M##FfG1L	
r>   c                   U R                   (       a  gUR                   (       a  gU R                  nU R                  S   nUR                  nUR                  S   nU R                  X#XE5      S:  a  gU R                  nU R                  S   nUR                  nUR                  S   n	U R                  XgX5      S:  a  gg)z7Determine whether this range is a contained by `other`.TFr   r   )r6   r0   r4   r{   r1   r   s
             r;   contained_byRange.contained_byF  s     :: ;;;;q><<?vBQF;;q><<?vBQFr>   c                p    [        U[        5      (       a  UR                  U 5      $ U R                  U5      $ )z.Determine whether this range contains `value`.)rk   r-   r   rg   re   s     r;   containsRange.containsc  s3     eU##%%d++''..r>   c                   U R                   (       d  UR                   (       a  gU R                  nU R                  S   nU R                  nU R                  S   nUR                  nUR                  S   nUR                  nUR                  S   n	U R	                  X#Xg5      S:  a  U R	                  X#X5      S::  a  gU R	                  XgX#5      S:  a  U R	                  XgXE5      S::  a  gg)z3Determine whether this range overlaps with `other`.Fr   r   Tr6   r0   r4   r1   r{   
r:   r   r   r   r   r   r   r   r   r   s
             r;   overlapsRange.overlapsm  s     ::;;q>;;q><<?<<? &CqH##FfG1L &CqH##FfG1Lr>   c                    U R                   (       d  UR                   (       a  gU R                  nU R                  S   nUR                  nUR                  S   nU R	                  X#XE5      S:  $ )zBDetermine whether this range is completely to the left of `other`.Fr   r   )r6   r1   r4   r0   r{   )r:   r   r   r   r   r   s         r;   strictly_left_ofRange.strictly_left_of  Z     ::;;q><<? ""6VFJJr>   c                    U R                   (       d  UR                   (       a  gU R                  nU R                  S   nUR                  nUR                  S   nU R	                  X#XE5      S:  $ )zCDetermine whether this range is completely to the right of `other`.Fr   r   r   )r:   r   r   r   r   r   s         r;   strictly_right_ofRange.strictly_right_of  r   r>   c                    U R                   (       d  UR                   (       a  gU R                  nU R                  S   nUR                  nUR                  S   nU R                  X#XE5      S:  $ )z>Determine whether this does not extend to the left of `other`.Fr   )r6   r0   r4   r{   )r:   r   r   r   r   r   s         r;   not_extend_left_ofRange.not_extend_left_of  Z     ::;;q><<? ""6VF!KKr>   c                    U R                   (       d  UR                   (       a  gU R                  nU R                  S   nUR                  nUR                  S   nU R                  X#XE5      S:*  $ )z?Determine whether this does not extend to the right of `other`.Fr   r   )r6   r1   r4   r{   )r:   r   r   r   r   r   s         r;   not_extend_right_ofRange.not_extend_right_of  r   r>   c                d   U R                  XX4S5      nUS:X  a<  U R                  5       nUc  gUS:X  a  US:X  a  XU-
  :H  $ X:H  $ US:X  a  X:H  $ XU-
  :H  $ US:X  aU  US:X  a  US:X  d  US:X  a  US:X  a  U R                  5       nUb  gUS:H  =(       a    US:H  =(       d    US:H  =(       a    US:H  $ g)	zLDetermine whether an upper bound is immediately successive to a
lower bound.Trp   FrX   rN   r   rc   rd   )r{   rm   )r:   rq   rr   rs   rt   resrz   s          r;   _upper_edge_adjacent_to_lower#Range._upper_edge_adjacent_to_lower  s     !!&&$G"9**,D|}S=!d]22!++S=!++!d]22AX #cMS=cM..0## "cM"S= "cM	 r>   c                v   U R                   (       d  UR                   (       a  gU R                  nU R                  S   nU R                  nU R                  S   nUR                  nUR                  S   nUR                  nUR                  S   n	U R	                  XEXg5      =(       d    U R	                  XX#5      $ )z8Determine whether this range is adjacent to the `other`.Fr   r   )r6   r0   r4   r1   r   r   s
             r;   adjacent_toRange.adjacent_to  s     ::;;q>;;q><<?<<?11f
 
//f
	
r>   c           	     D   U R                   (       a  U$ UR                   (       a  U $ U R                  U5      (       d!  U R                  U5      (       d  [        S5      eU R                  nU R
                  S   nU R                  nU R
                  S   nUR                  nUR
                  S   nUR                  nUR
                  S   n	U R                  X#Xg5      S:  a  Un
UnOUn
UnU R                  XEX5      S:  a  UnUnOUnU	n[        X[        [        X-   5      S9$ )zCompute the union of this range with the `other`.

This raises a ``ValueError`` exception if the two ranges are
"disjunct", that is neither adjacent nor overlapping.
zAAdding non-overlapping and non-adjacent ranges is not implementedr   r   rO   )r6   r   r   
ValueErrorr0   r4   r1   r{   r-   r	   r3   r:   r   r   r   r   r   r   r   r   r   rlowerrlower_brupperrupper_bs                 r;   unionRange.union  s    ::L;;K}}U##D,<,<U,C,C- 
 ;;q>;;q><<?<<?vBQFFHFHvBQFFHFH4X5H#I
 	
r>   c                $    U R                  U5      $ r@   )r   r:   r   s     r;   __add__Range.__add__@  s    zz%  r>   c           	        U R                   (       d  UR                   (       a  U $ U R                  nU R                  S   nU R                  nU R                  S   nUR                  nUR                  S   nUR                  nUR                  S   n	U R	                  X#Xg5      n
U R	                  XEX5      nU
S:  a  US:  a  [        S5      eU R	                  X#X5      nU R	                  XEXg5      nUS:  d  US:  a  U $ U
S:  a  US::  a  [        SSSS9$ U
S::  a^  US:  aX  US::  aR  US:X  a  SOS	nUS:w  a'  US	:w  a!  U R	                  X#Xn5      S:X  a  [        SSSS9$ [        UU[        [        X>-   5      S
9$ U
S:  a^  US:  aX  US::  aR  U	S	:X  a  SOSnUS:w  a'  US	:w  a!  U R	                  XXE5      S:X  a  [        SSSS9$ [        UU[        [        X-   5      S
9$  SU  SU 35       e)zCompute the difference between this range and the `other`.

This raises a ``ValueError`` exception if the two ranges are
"disjunct", that is neither adjacent nor overlapping.
r   r   z5Subtracting a strictly inner range is not implementedNTrA   rN   rc   rX   rO   rd   zUnhandled case computing z - )	r6   r0   r4   r1   r{   r   r-   r	   r3   )r:   r   r   r   r   r   r   r   r   r   sl_vs_olsu_vs_ousl_vs_ousu_vs_olr   r   s                   r;   
differenceRange.differenceC  s    ::K;;q>;;q><<?<<?&&vJ&&vJa<HqLG  &&vJ&&vJ a<8a<K q=X]t400 q=X]x1}&#os3HCO''&K T4t44X-@A  q=X]x1}&#os3HCO''&K T4t44X-@A  	C1$s5'BBur>   c                $    U R                  U5      $ r@   )r   r   s     r;   __sub__Range.__sub__  s    u%%r>   c           	        U R                   (       d'  UR                   (       d  U R                  U5      (       d  [        SSSS9$ U R                  nU R                  S   nU R
                  nU R                  S   nUR                  nUR                  S   nUR
                  nUR                  S   n	U R                  X#Xg5      S:  a  Un
UnOUn
UnU R                  XEX5      S:  a  UnU	nOUnUn[        U
U[        [        X-   5      S9$ )zTCompute the intersection of this range with the `other`.

.. versionadded:: 2.0.10

NTrA   r   r   rO   )	r6   r   r-   r0   r4   r1   r{   r	   r3   r   s                 r;   intersectionRange.intersection  s     ::DMM%,@,@t400;;q>;;q><<?<<?vBQFFHFHvBQFFHFHX%89
 	
r>   c                $    U R                  U5      $ r@   )r   r   s     r;   __mul__Range.__mul__  s      ''r>   c                "    U R                  5       $ r@   )
_stringifyrB   s    r;   __str__Range.__str__  s      r>   c                    U R                   (       a  gU R                  U R                  p!Uc  SOUnUc  SOUn[        SU R                  5      u  p4U U SU U 3$ )Nr6    zTuple[str, str],)r6   r0   r1   r	   r4   )r:   lrb0b1s        r;   r   Range._stringify  s]    ::zz4::1)B)B'5aS!RD!!r>    )NN)r0   r/   r1   r/   r4   r3   r6   r5   )returnr5   )r   zAbstractSingleRange[_T])rf   r&   r   r5   )r   r   )F)rq   r/   rr   strrs   r/   rt   r   ru   r5   r   rl   )r   r   r   r5   )r   	Range[_T]r   r5   )rf   zUnion[_T, Range[_T]]r   r5   )
rq   r/   rr   r   rs   r/   rt   r   r   r5   )r   r   r   r   )r   r   )2__name__
__module____qualname____firstlineno____doc__r0   __annotations__r1   r   dataclassesfieldr4   r6   	dc_kwonlyr!   r<   rC   propertyrG   rK   rP   rT   rY   r\   r`   rg   rm   r{   r   r   r   __contains__r   r   
__lshift__r   
__rshift__r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r   r>   r;   r-   r-   ;   s^   * E<E<)//==!''6t6)//JJ	JJ!''CCCtC #'"&	
 #'		  	
  	 	$  
  
 % %
 5 5 % %
 5 5 % %
<4 "WW W 	W
 W W 
Wr
6:/ L@K "JK #JLL-- - 	-
 - 
-^
,,
\!JCX&$
L(!
"r>   r-   c                  ,    \ rS rSrSr\SS j5       rSrg)
MultiRangei  a  Represents a multirange sequence.

This list subclass is an utility to allow automatic type inference of
the proper multi-range SQL type depending on the single range values.
This is useful when operating on literal multi-ranges::

    import sqlalchemy as sa
    from sqlalchemy.dialects.postgresql import MultiRange, Range

    value = literal(MultiRange([Range(2, 4)]))

    select(tbl).where(tbl.c.value.op("@")(MultiRange([Range(-3, 7)])))

.. versionadded:: 2.0.26

.. seealso::

    - :ref:`postgresql_multirange_list_use`.
c                    [        5       $ r@   )AbstractMultiRangerB   s    r;   r`   MultiRange.__sa_type_engine__  s    !##r>   r   N)r   zAbstractMultiRange[_T])r   r   r   r   r   r   r`   r   r   r>   r;   r   r     s    ( $ $r>   r   c                     ^  \ rS rSrSrSrSr\S
S j5       r\      SS j5       r      SU 4S jjr " S S\	R                  \\      5      rS	rU =r$ )AbstractRangei  z0Base class for single and multi Range SQL types.Tc                    g r@   r   r:   clskws      r;   adaptAbstractRange.adapt  s    7:r>   c                    g r@   r   r   s      r;   r   r     s     r>   c                   > [        U[        [        45      (       a<  XR                  La.  U R                  n[        U S3XR                  4SU05      " 5       $ [        TU ]  U5      $ )zDynamically adapt a range type to an abstract impl.

For example ``INT4RANGE().adapt(_Psycopg2NumericRange)`` should
produce a type that will have ``_Psycopg2NumericRange`` behaviors
and also render as ``INT4RANGE`` in SQL and DDL.

	RangeImpl__visit_name__)
issubclassAbstractSingleRangeImplAbstractMultiRangeImpl	__class__r   typesuperr   )r:   r   r   
visit_namer   s       r;   r   r     so     s46LMNN>>) ,,J,i(nn%!:.   7=%%r>   c                      \ rS rSrSrSS jrSS jrSS jrSS jr\r	SS jr
\
rSS jrSS	 jrSS
 jrSS jrSS jrSS jrSrg) AbstractRange.comparator_factoryi  z-Define comparison operations for range types.c                B    U R                   R                  [        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.
)exproperater   )r:   r   r   s      r;   r   )AbstractRange.comparator_factory.contains  s     99$$Xu55r>   c                B    U R                   R                  [        U5      $ )z[Boolean expression. Returns true if the column is contained
within the right hand operand.
)r  r  r   r   s     r;   r   -AbstractRange.comparator_factory.contained_by#  s     99$$\599r>   c                B    U R                   R                  [        U5      $ )zlBoolean expression. Returns true if the column overlaps
(has points in common with) the right hand operand.
)r  r  r   r   s     r;   r   )AbstractRange.comparator_factory.overlaps)  s     99$$We44r>   c                B    U R                   R                  [        U5      $ )z[Boolean expression. Returns true if the column is strictly
left of the right hand operand.
)r  r  r   r   s     r;   r   1AbstractRange.comparator_factory.strictly_left_of/  s     99$$%5u==r>   c                B    U R                   R                  [        U5      $ )z\Boolean expression. Returns true if the column is strictly
right of the right hand operand.
)r  r  r   r   s     r;   r   2AbstractRange.comparator_factory.strictly_right_of7  s     99$$%6>>r>   c                B    U R                   R                  [        U5      $ )zoBoolean expression. Returns true if the range in the column
does not extend right of the range in the operand.
)r  r  r   r   s     r;   r   4AbstractRange.comparator_factory.not_extend_right_of?  s     99$$%8%@@r>   c                B    U R                   R                  [        U5      $ )znBoolean expression. Returns true if the range in the column
does not extend left of the range in the operand.
)r  r  r   r   s     r;   r   3AbstractRange.comparator_factory.not_extend_left_ofE  s     99$$%7??r>   c                B    U R                   R                  [        U5      $ )zeBoolean expression. Returns true if the range in the column
is adjacent to the range in the operand.
)r  r  r   r   s     r;   r   ,AbstractRange.comparator_factory.adjacent_toK  s     99$$[%88r>   c                V    U R                   R                  [        R                  U5      $ zyRange expression. Returns the union of the two ranges.
Will raise an exception if the resulting range is not
contiguous.
)r  r  r   addr   s     r;   r   &AbstractRange.comparator_factory.unionQ      
 99$$Y]]E::r>   c                V    U R                   R                  [        R                  U5      $ r  )r  r  r   subr   s     r;   r   +AbstractRange.comparator_factory.differenceX  r  r>   c                V    U R                   R                  [        R                  U5      $ )zRange expression. Returns the intersection of the two ranges.
Will raise an exception if the resulting range is not
contiguous.
)r  r  r   mulr   s     r;   r   -AbstractRange.comparator_factory.intersection_  r  r>   r   N)r   r   r   r   r   ColumnElement[bool])r   r   r   r  )r   r   r   zColumnElement[Range[_T]])r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r>   r;   comparator_factoryr     sL    ;	6	:	5	> &
	? '
	A	@	9	;	;	;r>   r  r   )r   z	Type[_TE]r   r   r   r$   )r   zType[TypeEngineMixin]r   r   r   TypeEngine[Any])r   z-Type[Union[TypeEngine[Any], TypeEngineMixin]]r   r   r   r  )r   r   r   r   r   render_bind_cast__abstract__r   r   r    
Comparatorr-   r   r  r   __classcell__)r   s   @r;   r   r     s    :L: :(03	  &: &  & 
	 &DN;Z225:> N; N;r>   r   c                  &    \ rS rSrSrSrSS jrSrg)r_   ig  zBase for PostgreSQL RANGE types.

These are types that return a single :class:`_postgresql.Range` object.

.. seealso::

    `PostgreSQL range functions <https://www.postgresql.org/docs/current/static/functions-range.html>`_

Tc                   UR                   b  UR                   OUR                  n[        U[        5      (       a$  [	        U5      (       a
  [        5       $ [        5       $ [        U[        [        45      (       a
  [        5       $ [        U[        5      (       a%  UR                  (       d
  [        5       $ [        5       $ [        U[        5      (       a
  [        5       $ [         R"                  $ r@   )r0   r1   rk   rl   	_is_int32	INT4RANGE	INT8RANGEr   floatNUMRANGEr   tzinfoTSRANGE	TSTZRANGEr   	DATERANGEsqltypesNULLTYPE)r:   rf   specs      r;   _resolve_for_literal(AbstractSingleRange._resolve_for_literalt  s    #kk5u{{5;;dC    {" {"w.//:h''$(KK79@Y[@d##; $$$r>   r   N)rf   z
Range[Any]r   r   r   r   r   r   r   r!  r2  r   r   r>   r;   r_   r_   g  s     L%r>   r_   c                      \ rS rSrSrSrg)r   i  zMMarker for AbstractSingleRange that will apply a subclass-specific
adaptationr   Nr   r   r   r   r   r   r   r>   r;   r   r         r>   r   c                  &    \ rS rSrSrSrSS jrSrg)r   i  zvBase for PostgreSQL MULTIRANGE types.

these are types that return a sequence of :class:`_postgresql.Range`
objects.

Tc                    U(       d  [         R                  $ US   nUR                  b  UR                  OUR                  n[	        U[
        5      (       a+  [        S U 5       5      (       a
  [        5       $ [        5       $ [	        U[        [        45      (       a
  [        5       $ [	        U[        5      (       a%  UR                  (       d
  [        5       $ [        5       $ [	        U[         5      (       a
  [#        5       $ [         R                  $ )Nr   c              3  8   #    U  H  n[        U5      v   M     g 7fr@   )r&  ).0r   s     r;   	<genexpr>:AbstractMultiRange._resolve_for_literal.<locals>.<genexpr>  s     /A9Q<<s   )r/  r0  r0   r1   rk   rl   allINT4MULTIRANGEINT8MULTIRANGEr   r)  NUMMULTIRANGEr   r+  TSMULTIRANGETSTZMULTIRANGEr   DATEMULTIRANGE)r:   rf   firstr1  s       r;   r2  'AbstractMultiRange._resolve_for_literal  s    $$$a#kk5u{{5;;dC   ////%''%''w.// ?"h'')-<>J.:JJd##!## $$$r>   r   N)rf   zSequence[Range[Any]]r   r   r4  r   r>   r;   r   r     s     L%r>   r   c                      \ rS rSrSrSrg)r   i  zLMarker for AbstractMultiRange that will apply a subclass-specific
adaptationr   Nr6  r   r>   r;   r   r     r7  r>   r   c                      \ rS rSrSrS rSrg)r'  i  z(Represent the PostgreSQL INT4RANGE type.r   Nr   r   r   r   r   r   r   r   r>   r;   r'  r'    
    2 Nr>   r'  c                      \ rS rSrSrS rSrg)r(  i  z(Represent the PostgreSQL INT8RANGE type.r   NrI  r   r>   r;   r(  r(    rJ  r>   r(  c                      \ rS rSrSrS rSrg)r*  i  z'Represent the PostgreSQL NUMRANGE type.r   NrI  r   r>   r;   r*  r*    s
    1Nr>   r*  c                      \ rS rSrSrS rSrg)r.  i  z(Represent the PostgreSQL DATERANGE type.r   NrI  r   r>   r;   r.  r.    rJ  r>   r.  c                      \ rS rSrSrS rSrg)r,  i  &Represent the PostgreSQL TSRANGE type.r   NrI  r   r>   r;   r,  r,    s
    0Nr>   r,  c                      \ rS rSrSrS rSrg)r-  i  (Represent the PostgreSQL TSTZRANGE type.r   NrI  r   r>   r;   r-  r-    rJ  r>   r-  c                      \ rS rSrSrS rSrg)r?  i  z-Represent the PostgreSQL INT4MULTIRANGE type.r   NrI  r   r>   r;   r?  r?    
    7%Nr>   r?  c                      \ rS rSrSrS rSrg)r@  i  z-Represent the PostgreSQL INT8MULTIRANGE type.r   NrI  r   r>   r;   r@  r@    rS  r>   r@  c                      \ rS rSrSrS rSrg)rA  i  z,Represent the PostgreSQL NUMMULTIRANGE type.r   NrI  r   r>   r;   rA  rA    s
    6$Nr>   rA  c                      \ rS rSrSrS rSrg)rD  i  z-Represent the PostgreSQL DATEMULTIRANGE type.r   NrI  r   r>   r;   rD  rD    rS  r>   rD  c                      \ rS rSrSrS rSrg)rB  i  rO  r   NrI  r   r>   r;   rB  rB    s
    0#Nr>   rB  c                      \ rS rSrSrS rSrg)rC  i  rQ  r   NrI  r   r>   r;   rC  rC    s
    2%Nr>   rC  ii   c                    U R                   S L =(       d'    [        U R                   s=:*  =(       a	    [        :*  Os  =(       a<    U R                  S L =(       d'    [        U R                  s=:*  =(       a	    [        :*  $ s  $ r@   )r0   _min_int_32_max_int_32r1   )r   s    r;   r&  r&    sV    GGtOD{aggDDD 	4@;!''@@[@@r>   r   )r   z
Range[int]r   r5   )H
__future__r   r   r   r   r   decimalr   typingr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r/  sqlsql.type_apir    utilr!   util.typingr"   sql.elementsr#   r$   r%   r&   r3   dc_slotsr   	dataclassr-   r   r   r_   r   r   r   rl   r'  r(  r*  r.  r,  r-  r?  r@  rA  rD  rB  rC  r[  rZ  r&  r   r>   r;   <module>rf     sI   #                   " #  ) *  ' ( !  &  "-#/T,-HD!IHI /d/h/L
"GBK L
" 0L
"^$eBi $4;H''+ ;D %-b	2  %F1"5 
!%xb	':; !%H/3 
!#C( !!#C( ! "7+  !#D) !!(+ !#H- !&', &&', &%&w/ %&'- &$%h/ $&'1 & r>   