MySqlSingleton1Wrapper._write_result_handler()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
ccs 0
cts 1
cp 0
rs 10
c 0
b 0
f 0
cc 1
nop 2
crap 2
1 1
from typing import Any, Dict
2
3 1
from pystratum_common.wrapper.Singleton1Wrapper import Singleton1Wrapper
4 1
5
from pystratum_mysql.wrapper.MySqlWrapper import MySqlWrapper
6
7 1
8
class MySqlSingleton1Wrapper(Singleton1Wrapper, MySqlWrapper):
9
    """
10
    Wrapper method generator for stored procedures that are selecting 1 row with one column only.
11
    """
12
13 1
    # ------------------------------------------------------------------------------------------------------------------
14
    def _write_result_handler(self, routine: Dict[str, Any]) -> None:
15
        self._write_line(
16
                'return self.execute_sp_singleton1({0!s})'.format(str(self._generate_command(routine))))
17
18
# ----------------------------------------------------------------------------------------------------------------------
19