diff --git a/titles/idac/schema/item.py b/titles/idac/schema/item.py index e3e4eba..38c7ecd 100644 --- a/titles/idac/schema/item.py +++ b/titles/idac/schema/item.py @@ -832,13 +832,20 @@ class IDACItemData(BaseData): return None return result.fetchall() - def get_round_rank_by_id(self, aime_id: int, round_event_id: int) -> Optional[List[Row]]: + def get_round_rank_by_id(self, aime_id: int, round_event_id: int) -> Optional[Row]: result = self.execute('call query_user_round_ranking(:aime_id, :round_event_id)', {'aime_id': aime_id, 'round_event_id': round_event_id}) if result is None: return None return result.fetchone() + def get_round_top_three(self, round_event_id: int) -> Optional[List[Row]]: + result = self.execute('call query_round_ranking_top_three(:round_event_id)', {'round_event_id': round_event_id}) + + if result is None: + return None + return result.fetchall() + def get_timetrial_event( self, aime_id: int, timetrial_event_id: int ) -> Optional[Row]: