1.1.0.rc2 #342

Merged
edraft merged 9 commits from 1.1.0.rc2 into 1.1.0 2023-08-16 19:09:05 +02:00
2 changed files with 11 additions and 2 deletions
Showing only changes of commit 073c318671 - Show all commits

View File

@ -108,6 +108,15 @@ class Achievement(TableABC):
"""
)
@staticmethod
def get_select_by_server_id_string(id: int) -> str:
return str(
f"""
SELECT * FROM `Achievements`
WHERE `ServerId` = {id};
"""
)
@property
def insert_string(self) -> str:
return str(

View File

@ -65,8 +65,8 @@ class AchievementRepositoryService(AchievementRepositoryABC):
def get_achievements_by_server_id(self, server_id: int) -> List[Achievement]:
achievements = List(Achievement)
self._logger.trace(__name__, f"Send SQL command: {Achievement.get_select_by_id_string(server_id)}")
results = self._context.select(Achievement.get_select_all_string())
self._logger.trace(__name__, f"Send SQL command: {Achievement.get_select_by_server_id_string(server_id)}")
results = self._context.select(Achievement.get_select_by_server_id_string(server_id))
for result in results:
self._logger.trace(__name__, f"Get user with id {result[0]}")
achievements.append(self._from_result(result))