import logging from db.repository import Repository, get_db_conn # Setup logging (configure as needed) logging.basicConfig(level=logging.INFO) class DeleteDatabase(Repository): async def delete_record(self, params): if "id" not in params: raise ValueError("The 'id' parameter is required.") query = """ DELETE FROM metadata WHERE id = :id """ try: await self._exec(query, params) logging.info(f"Record with id {params['id']} deleted successfully.") except Exception as e: logging.error(f"Error deleting record with id {params['id']}: {e}") raise