Test Failed
Push — master ( 7c9493...8a6195 )
by P.R.
09:18
created

MySqlMultiWrapper._write_result_handler()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
ccs 1
cts 2
cp 0.5
rs 10
c 0
b 0
f 0
cc 1
nop 2
crap 1.125
1 1
from typing import Dict, Any
2
3 1
from pystratum_common.wrapper.MultiWrapper import MultiWrapper
4 1
from pystratum_mysql.wrapper.MySqlWrapper import MySqlWrapper
5
6
7 1
class MySqlMultiWrapper(MySqlWrapper, MultiWrapper):
8
    """
9
    Wrapper method generator for stored procedures with designation type multi.
10
    """
11
12
    # ------------------------------------------------------------------------------------------------------------------
13 1
    def _write_result_handler(self, routine: Dict[str, Any]) -> None:
14
        self._write_line('return self.execute_sp_multi({0!s})'.format(self._generate_command(routine)))
15
16
# ----------------------------------------------------------------------------------------------------------------------
17