Closed Meriem-BM closed 2 weeks ago
The changes in the qfRoundRepository.ts
file involve enhancing the findArchivedQfRounds
function by incorporating additional fields related to Donation
and User
entities. This enhancement includes updating the query with new selection criteria and joins to provide more comprehensive data about archived QF rounds.
File Path | Change Summary |
---|---|
src/repositories/qfRoundRepository.ts |
Added imports for Donation and User entities, and refactored the findArchivedQfRounds function to include more detailed information by modifying the query to include additional fields and joins. |
sequenceDiagram
participant Client
participant QfRoundRepo
participant Database
participant Donation
participant User
Client->>QfRoundRepo: findArchivedQfRounds()
QfRoundRepo->>Database: Query archived QF rounds
Database->>QfRoundRepo: Return QF rounds data
QfRoundRepo->>Donation: Query related donations
Donation->>QfRoundRepo: Return donations data
QfRoundRepo->>User: Query related users
User->>QfRoundRepo: Return users data
QfRoundRepo->>Client: Return comprehensive QF rounds data
In the code where data flows, New fields join where logic grows. Donations, users, now entwined, In queries deep, their paths aligned. Archived rounds, with tales to tell, Enhanced, they serve the data well.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This query however can be heavy if the round is HUGE, I would recommend we pre-save the total at the end of the round in its own column and then just display it here.
This query however can be heavy if the round is HUGE, I would recommend we pre-save the total at the end of the round in its own column and then just display it here.
I agree, for now I'll merge it, but I'll open another PR to improve it with what you have suggested.
Related to https://github.com/Giveth/giveth-dapps-v2/issues/4245#issuecomment-2162362533
Summary by CodeRabbit