MCPcopy
hub / github.com/psycopg/psycopg / Int4

Class Int4

psycopg/psycopg/_wrappers.py:32–47  ·  view source on GitHub ↗

Force dumping a Python `!int` as a PostgreSQL :sql:`integer/int4`.

Source from the content-addressed store, hash-verified

30
31
32class 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
50class Int8(int):

Callers 4

test_copy_in_recordsFunction · 0.85
test_copy_in_recordsFunction · 0.85
test_copy_in_recordsFunction · 0.85
test_copy_in_recordsFunction · 0.85

Calls

no outgoing calls

Tested by 4

test_copy_in_recordsFunction · 0.68
test_copy_in_recordsFunction · 0.68
test_copy_in_recordsFunction · 0.68
test_copy_in_recordsFunction · 0.68