MsSqlSingleton0Wrapper._write_result_handler()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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