Force dumping a Python `!int` as a PostgreSQL :sql:`integer/int4`.
| 30 | |
| 31 | |
| 32 | class Int4(int): |
| 33 | """ |
| 34 | Force dumping a Python `!int` as a PostgreSQL :sql:`integer/int4`. |
| 35 | """ |
| 36 | |
| 37 | __module__ = _MODULE |
| 38 | __slots__ = () |
| 39 | |
| 40 | def __new__(cls, arg: int) -> "Int4": |
| 41 | return super().__new__(cls, arg) |
| 42 | |
| 43 | def __str__(self) -> str: |
| 44 | return super().__repr__() |
| 45 | |
| 46 | def __repr__(self) -> str: |
| 47 | return f"{self.__class__.__name__}({super().__repr__()})" |
| 48 | |
| 49 | |
| 50 | class Int8(int): |
no outgoing calls