from abc import ABC, abstractmethod
from typing import Dict

from graph.connections.db_instance import DbInstance


class DbHandler(ABC):
    @abstractmethod
    def get_new_db_instance(self, readonly: bool) -> DbInstance:
        pass

    @abstractmethod
    def get_db_info(self) -> Dict:
        pass

    @abstractmethod
    def db_exists(self) -> bool:
        pass

    @abstractmethod
    def create_db(self) -> None:
        pass

    @abstractmethod
    def delete_db(self) -> None:
        pass

    @abstractmethod
    def cleanup_handler(self) -> None:
        pass
