| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import abc |
||
| 2 | from typing import Dict |
||
| 3 | |||
| 4 | |||
| 5 | class BulkHandler(metaclass=abc.ABCMeta): |
||
| 6 | """ |
||
| 7 | Abstract class for handlers for stored routines with large result sets. |
||
| 8 | """ |
||
| 9 | |||
| 10 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 11 | def row(self, row: Dict) -> None: |
||
| 12 | """ |
||
| 13 | Will be invoked for each row in the result set. |
||
| 14 | |||
| 15 | :param dict row: A row from the result set. |
||
| 16 | """ |
||
| 17 | raise NotImplementedError() |
||
| 18 | |||
| 19 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 20 | def start(self) -> None: |
||
| 21 | """ |
||
| 22 | Will be invoked before the first row will be processed. |
||
| 23 | """ |
||
| 24 | raise NotImplementedError() |
||
| 25 | |||
| 26 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 27 | def stop(self) -> None: |
||
| 28 | """ |
||
| 29 | Will be invoked after the last row has been processed. |
||
| 30 | """ |
||
| 31 | raise NotImplementedError() |
||
| 32 | |||
| 34 |