| 227 | await self.__rollback() |
| 228 | |
| 229 | def __repr__(self): |
| 230 | attrs = [] |
| 231 | attrs.append('state:{}'.format(self._state.name.lower())) |
| 232 | |
| 233 | if self._isolation is not None: |
| 234 | attrs.append(self._isolation) |
| 235 | if self._readonly: |
| 236 | attrs.append('readonly') |
| 237 | if self._deferrable: |
| 238 | attrs.append('deferrable') |
| 239 | |
| 240 | if self.__class__.__module__.startswith('asyncpg.'): |
| 241 | mod = 'asyncpg' |
| 242 | else: |
| 243 | mod = self.__class__.__module__ |
| 244 | |
| 245 | return '<{}.{} {} {:#x}>'.format( |
| 246 | mod, self.__class__.__name__, ' '.join(attrs), id(self)) |