Source code for sqltrack.engines.engine
from __future__ import annotations
from abc import ABC
from abc import abstractmethod
[docs]class Engine(ABC):
schema = None
[docs] @abstractmethod
def data_dir(self) -> str:
"""
Returns the path to the directory where supporting
files for this engine are stored.
"""
pass
[docs] @abstractmethod
def connect(self) -> DBAPIConnection:
"""
Returns database connection objects.
"""
pass
[docs] @abstractmethod
def map_type(self, client, typ) -> str:
"""
Given Python type ``typ``, returns SQL type as string.
"""
pass