Method
_optional_conn_ctx_manager
(
self, connection: Optional[Connection] = None
)
Source from the content-addressed store, hash-verified
| 3188 | |
| 3189 | @contextlib.contextmanager |
| 3190 | def _optional_conn_ctx_manager( |
| 3191 | self, connection: Optional[Connection] = None |
| 3192 | ) -> Iterator[Connection]: |
| 3193 | if connection is None: |
| 3194 | with self.connect() as conn: |
| 3195 | yield conn |
| 3196 | else: |
| 3197 | yield connection |
| 3198 | |
| 3199 | @contextlib.contextmanager |
| 3200 | def begin(self) -> Iterator[Connection]: |
Callers
nothing calls this directly
Tested by
no test coverage detected