pystratum_mssql.MsSqlConnector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A MsSqlConnector.connect() 0 6 1
A MsSqlConnector.disconnect() 0 6 1
1
import abc
2
from typing import Any
3
4
5
class MsSqlConnector:
6
    """
7
    Interface for classes for connecting to a MS SQL Server instances.
8
    """
9
10
    # ------------------------------------------------------------------------------------------------------------------
11
    @abc.abstractmethod
12
    def connect(self) -> Any:
13
        """
14
        Connects to a MS SQL Server instance.
15
        """
16
        raise NotImplementedError()
17
18
    # ------------------------------------------------------------------------------------------------------------------
19
    @abc.abstractmethod
20
    def disconnect(self) -> None:
21
        """
22
        Disconnects from a MS SQL Server instance.
23
        """
24
        raise NotImplementedError()
25
26
# ----------------------------------------------------------------------------------------------------------------------
27