pystratum_middle.BulkHandler   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 10
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A BulkHandler.start() 0 5 1
A BulkHandler.row() 0 7 1
A BulkHandler.stop() 0 5 1
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
33
# ----------------------------------------------------------------------------------------------------------------------
34