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