Feat: add __init__ and mod function signature

This commit is contained in:
2024-08-14 07:21:36 +02:00
parent 8a03ba8329
commit d613bf00df
5 changed files with 14 additions and 48 deletions

View File

@@ -1,4 +1,5 @@
import abc
from .metadata import AbstractMetadataEngine
@@ -6,31 +7,31 @@ class AbstractRepository(abc.ABC):
metadata_engine = AbstractMetadataEngine
@abc.abstractmethod
def schemas():
""" List schemas """
def schemas(self) -> list[str]:
"""List schemas"""
raise NotImplementedError
@abc.abstractmethod
def tables(schema):
""" List table in schema"""
def tables(self, schema) -> list[str]:
"""List table in schema"""
raise NotImplementedError
@abc.abstractmethod
def info(self, path):
""" Get infos about a file"""
def infos(self, table: str, schema: str) -> dict[str, str]:
"""Get infos about the table"""
raise NotImplementedError
@abc.abstractmethod
def read(self, path):
""" Get content of a file"""
def read(self, table: str, schema: str):
"""Get content of the table"""
raise NotImplementedError
@abc.abstractmethod
def write(self, path, content):
""" Write content into the file"""
def write(self, content, table: str, schema: str):
"""Write content into the table"""
raise NotImplementedError
@abc.abstractmethod
def delete(self, path):
""" Delete the file """
def delete_table(self, table: str, schema: str):
"""Delete the table"""
raise NotImplementedError