diff --git a/opengemini_client/client.py b/opengemini_client/client.py index 70d3add..4174d33 100644 --- a/opengemini_client/client.py +++ b/opengemini_client/client.py @@ -37,6 +37,7 @@ def write_batch_points(self, database: str, batch_points: BatchPoints): :return: return an error message """ + @abstractmethod def create_database(self, database: str, rp: RpConfig = None): """ create database @@ -44,14 +45,28 @@ def create_database(self, database: str, rp: RpConfig = None): :param database: name """ + @abstractmethod def show_databases(self) -> List[str]: """ show databases :return: returns a databases list. """ + @abstractmethod def drop_database(self, database: str): """ drop database :param database: name """ + + @abstractmethod + def create_retention_policy(self, dbname, rp_config: RpConfig, is_default: bool): + pass + + @abstractmethod + def show_retention_policies(self, dbname): + pass + + @abstractmethod + def drop_retention_policy(self, dbname, retention_policy: str): + pass diff --git a/opengemini_client/client_impl.py b/opengemini_client/client_impl.py index cc921cf..11c547c 100644 --- a/opengemini_client/client_impl.py +++ b/opengemini_client/client_impl.py @@ -163,11 +163,17 @@ def write_batch_points(self, database: str, batch_points: BatchPoints): def create_database(self, database: str, rp: RpConfig = None): pass - def create_database_with_rp(self, database: str, ): - pass - def show_databases(self) -> List[str]: pass def drop_database(self, database: str): pass + + def create_retention_policy(self, dbname, rp_config: RpConfig, is_default: bool): + pass + + def show_retention_policies(self, dbname): + pass + + def drop_retention_policy(self, dbname, retention_policy: str): + pass