From 22714994d2b7cfa238c8b2d54a3639cd6417e9b6 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 21 Nov 2025 22:30:47 -0800 Subject: scaffold implementation for remote sqlite db --- database/base_database.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 database/base_database.py (limited to 'database/base_database.py') 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 -- cgit v1.2.3