def save(self): print("\n\nALERT MANAGER *** SAVE ***") query = "INSERT INTO {} (launch_datetime) VALUES (%s)".format( ALERT_MANAGER_TABLE_NAME) params = [self.__today] print("query", query) print("params", params) my_sql.execute_and_close(query=query, params=params)
def drop_table(table_name: str): query = "DROP TABLES {}".format(table_name) my_sql.execute_and_close(query=query)
def __use_db(self): query = "USE {}".format(self._db_name) print(query) my_sql.execute_and_close(query=query)
def __create_db(self): query = "CREATE DATABASE {}".format(self._db_name) print(query) my_sql.execute_and_close(query=query)
def __delete_db(self): query = "DROP DATABASE {}".format(self._db_name) print(query) my_sql.execute_and_close(query=query)