Total Complexity | 1 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Coverage | 83.33% |
Changes | 0 |
1 | 1 | from typing import Any, Dict |
|
2 | |||
3 | 1 | from pystratum_common.wrapper.Singleton0Wrapper import Singleton0Wrapper |
|
4 | 1 | ||
5 | from pystratum_mysql.wrapper.MySqlWrapper import MySqlWrapper |
||
6 | |||
7 | 1 | ||
8 | class MySqlSingleton0Wrapper(MySqlWrapper, Singleton0Wrapper): |
||
9 | """ |
||
10 | Wrapper method generator for stored procedures that are selecting 0 or 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('return self.execute_sp_singleton0({0!s})'.format(self._generate_command(routine))) |
||
16 | |||
18 |