MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / __init__

Method __init__

asyncpg/transaction.py:47–61  ·  view source on GitHub ↗
(self, connection, isolation, readonly, deferrable)

Source from the content-addressed store, hash-verified

45 '_state', '_nested', '_id', '_managed')
46
47 def __init__(self, connection, isolation, readonly, deferrable):
48 super().__init__(connection)
49
50 if isolation and isolation not in ISOLATION_LEVELS:
51 raise ValueError(
52 'isolation is expected to be either of {}, '
53 'got {!r}'.format(ISOLATION_LEVELS, isolation))
54
55 self._isolation = isolation
56 self._readonly = readonly
57 self._deferrable = deferrable
58 self._state = TransactionState.NEW
59 self._nested = False
60 self._id = None
61 self._managed = False
62
63 async def __aenter__(self):
64 if self._managed:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected