(self)
| 232 | await self._cursor.close() |
| 233 | |
| 234 | def close(self) -> None: |
| 235 | self._rows.clear() |
| 236 | |
| 237 | # updated as of 2.0.44 |
| 238 | # try to "close" the cursor based on what we know about the driver |
| 239 | # and if we are able to. otherwise, hope that the asyncio |
| 240 | # extension called _async_soft_close() if the cursor is going into |
| 241 | # a sync context |
| 242 | if self._cursor is None or bool(self._soft_closed_memoized): |
| 243 | return |
| 244 | |
| 245 | if not self._awaitable_cursor_close: |
| 246 | self._cursor.close() # type: ignore[unused-coroutine] |
| 247 | elif in_greenlet(): |
| 248 | await_(self._cursor.close()) |
| 249 | |
| 250 | def execute( |
| 251 | self, |
no test coverage detected