MCPcopy
hub / github.com/psycopg/psycopg / __init__

Method __init__

tests/fix_pq.py:108–112  ·  view source on GitHub ↗
(self, pgconn: pq.abc.PGconn)

Source from the content-addressed store, hash-verified

106
107class TraceLog:
108 def __init__(self, pgconn: pq.abc.PGconn):
109 self.pgconn = pgconn
110 self.tempfile = TemporaryFile(buffering=0)
111 pgconn.trace(self.tempfile.fileno())
112 pgconn.set_trace_flags(pq.Trace.SUPPRESS_TIMESTAMPS)
113
114 def __del__(self):
115 if self.pgconn.status == pq.ConnStatus.OK:

Callers

nothing calls this directly

Calls 3

filenoMethod · 0.80
traceMethod · 0.45
set_trace_flagsMethod · 0.45

Tested by

no test coverage detected