diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-11-21 22:30:47 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-11-21 23:27:30 -0800 |
| commit | 22714994d2b7cfa238c8b2d54a3639cd6417e9b6 (patch) | |
| tree | dc7036309fbb35376f452f44e33bfbe9c2e18c61 /database/base_database.py | |
| parent | a7347217899fb7a3addcee58a9fbee4a0c07ff57 (diff) | |
scaffold implementation for remote sqlite db
Diffstat (limited to 'database/base_database.py')
| -rw-r--r-- | database/base_database.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/database/base_database.py b/database/base_database.py new file mode 100644 index 0000000..6b03755 --- /dev/null +++ b/database/base_database.py @@ -0,0 +1,40 @@ +from abc import ABC, abstractmethod + +class BaseDatabase(ABC): + + @abstractmethod + def close(self): + pass + + @abstractmethod + def add_new_wac_entry(self, key: str, is_news: bool, post_type: str): + pass + + @abstractmethod + def add_new_translation(self, key: str, source_lang: str, + target_lang: str, source_txt: str, result_txt: str): + pass + + @abstractmethod + def add_new_summary(self, key: str, headline: str, content: str): + pass + + @abstractmethod + def add_news_entry(self, key: str, news_entry: dict): + pass + + @abstractmethod + def get_summary(self, key: str): + pass + + @abstractmethod + def get_translation(self, key: str): + pass + + @abstractmethod + def get_wac_entry(self, key: str): + pass + + @abstractmethod + def check_news_id_exists(self, key: str) -> bool: + pass |
