Coverage for pystratum_common/helper/DataTypeHelper.py: 0%
7 statements
« prev ^ index » next coverage.py v7.5.1, created at 2024-05-13 08:46 +0200
« prev ^ index » next coverage.py v7.5.1, created at 2024-05-13 08:46 +0200
1import abc
2from typing import Any, Dict
5class DataTypeHelper(metaclass=abc.ABCMeta):
6 """
7 Utility class for deriving information based on a DBMS native data type.
8 """
10 # ------------------------------------------------------------------------------------------------------------------
11 @abc.abstractmethod
12 def column_type_to_python_type(self, data_type_info: Dict[str, Any]) -> str:
13 """
14 Returns the corresponding Python data type of DBMS native data type.
16 :param dict data_type_info: The DBMS native data type metadata.
17 """
18 raise NotImplementedError()
20 # ------------------------------------------------------------------------------------------------------------------
21 @abc.abstractmethod
22 def column_type_to_python_type_hint(self, data_type_info: Dict[str, Any]) -> str:
23 """
24 Returns the corresponding Python data type hint of a MySQL data type.
26 :param dict data_type_info: The MySQL data type metadata.
27 """
28 raise NotImplementedError()
30# ----------------------------------------------------------------------------------------------------------------------