|
| 1 | +from typing import Any, Optional |
| 2 | + |
| 3 | +from psycopg2._psycopg import ( |
| 4 | + InterfaceError, |
| 5 | + ProgrammingError |
| 6 | +) |
| 7 | + |
| 8 | + |
| 9 | +class Range: |
| 10 | + def __init__(self, lower: Optional[Any] = ..., upper: Optional[Any] |
| 11 | + = ..., bounds: str = ..., empty: bool = ...) -> None: ... |
| 12 | + |
| 13 | + @property |
| 14 | + def lower(self) -> Any: ... |
| 15 | + @property |
| 16 | + def upper(self) -> Any: ... |
| 17 | + @property |
| 18 | + def isempty(self) -> Any: ... |
| 19 | + @property |
| 20 | + def lower_inf(self) -> Any: ... |
| 21 | + @property |
| 22 | + def upper_inf(self) -> Any: ... |
| 23 | + @property |
| 24 | + def lower_inc(self) -> Any: ... |
| 25 | + @property |
| 26 | + def upper_inc(self) -> Any: ... |
| 27 | + def __contains__(self, x: Any) -> Any: ... |
| 28 | + def __bool__(self) -> Any: ... |
| 29 | + def __nonzero__(self) -> Any: ... |
| 30 | + def __eq__(self, other: Any) -> Any: ... |
| 31 | + def __ne__(self, other: Any) -> Any: ... |
| 32 | + def __hash__(self) -> Any: ... |
| 33 | + def __lt__(self, other: Any) -> Any: ... |
| 34 | + def __le__(self, other: Any) -> Any: ... |
| 35 | + def __gt__(self, other: Any) -> Any: ... |
| 36 | + def __ge__(self, other: Any) -> Any: ... |
| 37 | + |
| 38 | + |
| 39 | +def register_range(pgrange: Any, pyrange: Any, |
| 40 | + conn_or_curs: Any, globally: bool = ...) -> Any: ... |
| 41 | + |
| 42 | + |
| 43 | +class RangeAdapter: |
| 44 | + name: Any = ... |
| 45 | + adapted: Any = ... |
| 46 | + def __init__(self, adapted: Any) -> None: ... |
| 47 | + def __conform__(self, proto: Any) -> Any: ... |
| 48 | + def prepare(self, conn: Any) -> None: ... |
| 49 | + def getquoted(self) -> Any: ... |
| 50 | + |
| 51 | + |
| 52 | +class RangeCaster: |
| 53 | + subtype_oid: Any = ... |
| 54 | + typecaster: Any = ... |
| 55 | + array_typecaster: Any = ... |
| 56 | + def __init__(self, pgrange: Any, pyrange: Any, oid: Any, |
| 57 | + subtype_oid: Any, array_oid: Optional[Any] = ...) -> None: ... |
| 58 | + |
| 59 | + def parse(self, s: Any, cur: Optional[Any] = ...) -> Any: ... |
| 60 | + |
| 61 | + |
| 62 | +class NumericRange(Range): |
| 63 | + ... |
| 64 | + |
| 65 | + |
| 66 | +class DateRange(Range): |
| 67 | + ... |
| 68 | + |
| 69 | + |
| 70 | +class DateTimeRange(Range): |
| 71 | + ... |
| 72 | + |
| 73 | + |
| 74 | +class DateTimeTZRange(Range): |
| 75 | + ... |
| 76 | + |
| 77 | + |
| 78 | +class NumberRangeAdapter(RangeAdapter): |
| 79 | + def getquoted(self) -> Any: ... |
| 80 | + |
| 81 | + |
| 82 | +int4range_caster: Any |
| 83 | +int8range_caster: Any |
| 84 | +numrange_caster: Any |
| 85 | +daterange_caster: Any |
| 86 | +tsrange_caster: Any |
| 87 | +tstzrange_caster: Any |
0 commit comments