ZErB d Z ddlZddlmZmZ ddlmZmZmZ ddlm Z m Z mZ G d d Zd.d Z G d d Z G d d Z G d de Z G d de Z G d de Z G d de Z G d de Z eee eeeddd Ze eeeddd Ze eeedd d! Ze ed"ed#d$d% Ze ed&ed'd(d) Ze ed*ed+d,d- Ze dS )/z1Implementation of the Range type and adaptation N)ProgrammingErrorInterfaceError) ISQLQuoteadaptregister_adapter)new_typenew_array_type register_typec e Zd ZdZdZddZd Zd Zed Z ed Z ed Zed Zed Z ed Zed Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )Rangea Python representation for a PostgreSQL |range|_ type. :param lower: lower bound for the range. `!None` means unbound :param upper: upper bound for the range. `!None` means unbound :param bounds: one of the literal strings ``()``, ``[)``, ``(]``, ``[]``, representing whether the lower or upper bounds are included :param empty: if `!True`, the range is empty _lower_upper_boundsN[)Fc |s-|dvrt d| || _ || _ || _ d S d x| _ x| _ | _ d S )N)r z(]z()z[]zbound flags not valid: ) ValueErrorr r r )selflowerupperboundsemptys c/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/psycopg2/_range.py__init__zRange.__init__/ s_ <555 !E6!E!EFFFDKDK!DLLL7;;DK;$+ c | j | j j dS d | j j | j | j | j S )Nz(empty=True)z{}({!r}, {!r}, {!r}))r __class____name__formatr r r s r __repr__zRange.__repr__: sJ <n-;;;;)001HT[$,8 8 8r c | j dS | j d t | j dt | j | j d g}d | S )Nr r z, )r strr r join)r itemss r __str__z Range.__str__A sY <7 LOLO wwu~~r c | j S )z:The lower bound of the range. `!None` if empty or unbound.)r r s r r zRange.lowerN {r c | j S )z:The upper bound of the range. `!None` if empty or unbound.)r r s r r zRange.upperS r* r c | j du S )z`!True` if the range is empty.Nr r s r isemptyz Range.isemptyX s |t##r c &