관리-도구
편집 파일: _range.cpython-37.pyc
B *��]E � @ s� d Z ddlZddlmZmZ ddlmZmZmZ ddlm Z m Z mZ ddlm Z G dd� de�Zd0d d�ZG dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Zeee� eeedddd�Ze�� eeeddd d�Ze�� eeed!d"d#d�Ze�� ed$ed%d&d'd�Ze�� ed(ed)d*d+d�Ze�� ed,ed-d.d/d�Ze�� dS )1z1Implementation of the Range type and adaptation � N)�ProgrammingError�InterfaceError)� ISQLQuote�adapt�register_adapter)�new_type�new_array_type� register_type)�string_typesc @ s� e Zd ZdZdZd2dd�Zdd � Zd d� Zedd � �Z edd� �Z edd� �Zedd� �Zedd� �Z edd� �Zedd� �Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� ZdS )3�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 C sB |s,|dkrt d| ��|| _|| _|| _nd | _ | _| _d S )N)z[)z(]z()z[]zbound flags not valid: %r)� ValueErrorr r r )�self�lower�upper�bounds�empty� r �B/opt/alt/python37/lib64/python3.7/site-packages/psycopg2/_range.py�__init__/ s zRange.__init__c C s4 | j d krd| jj S d| jj| j| j| j f S d S )Nz%s(empty=True)z%s(%r, %r, %r))r � __class__�__name__r r )r r r r �__repr__: s zRange.__repr__c C s>