Closing a cursor just exhausts all remaining data.
(self)
| 49 | self._rows = None |
| 50 | |
| 51 | def close(self): |
| 52 | """ |
| 53 | Closing a cursor just exhausts all remaining data. |
| 54 | """ |
| 55 | conn = self.connection |
| 56 | if conn is None: |
| 57 | return |
| 58 | try: |
| 59 | while self.nextset(): |
| 60 | pass |
| 61 | finally: |
| 62 | self.connection = None |
| 63 | |
| 64 | def __enter__(self): |
| 65 | return self |