Skip to content

PM-5075 - use the user skill summary table#101

Merged
vas3a merged 1 commit into
developfrom
PM-5075_user-skill-summary
May 15, 2026
Merged

PM-5075 - use the user skill summary table#101
vas3a merged 1 commit into
developfrom
PM-5075_user-skill-summary

Conversation

@vas3a
Copy link
Copy Markdown
Collaborator

@vas3a vas3a commented May 15, 2026

This pull request simplifies the MemberSearchService in member-search.service.ts by removing unnecessary initialization logic and refactoring how skill win and submission data are queried. The changes improve maintainability and performance by leveraging a precomputed summary table and streamlining the query structure.

Service Initialization Simplification:

  • Removed the use of the OnModuleInit lifecycle hook and related asynchronous initialization logic for loading skill event and engagement source type IDs. The service no longer stores these IDs in instance variables.

Database Query Refactoring:

  • Replaced the dynamic computation of skill win and submission statistics (previously using multiple CTEs and filters) with a direct query to the skills.user_skill_win_summary table, simplifying the SQL and reducing query complexity.
  • Adjusted the join logic for filtering members: now conditionally joins user_match_data only if skills are specified, improving query efficiency when no skills are provided.

@vas3a vas3a requested a review from kkartunov May 15, 2026 10:30
@vas3a vas3a merged commit 5b30542 into develop May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants