17 lines
455 B
Python
17 lines
455 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from abc import ABC, abstractmethod
|
|
from typing import Self, Any, Optional, Sequence
|
|
from Models.QueryResponseModel import QueryResponseModel
|
|
|
|
class DatabasesInterface(ABC):
|
|
|
|
@abstractmethod
|
|
def close(self:Self) -> bool:pass
|
|
|
|
@abstractmethod
|
|
def query(self:Self,
|
|
query:str,
|
|
parameters:Optional[dict[str, Any|None]|Sequence[Any|None]] = None
|
|
) -> QueryResponseModel:pass |