Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reduce DB calls in plan list API #782

Merged
merged 7 commits into from
Sep 30, 2024
Merged

Conversation

anujk14
Copy link
Contributor

@anujk14 anujk14 commented Sep 23, 2024

  • Introduced a method called ListWithProducts in Plans repository, which fetches plans along with the products that belong to the plan
  • Plan list method in plan service now uses ListWithProducts, to reduce the number of DB calls that are made to fetch plans+products+features.

Copy link

vercel bot commented Sep 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 9:21am

@coveralls
Copy link

coveralls commented Sep 23, 2024

Pull Request Test Coverage Report for Build 11103185081

Details

  • 0 of 170 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 9.705%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/serve.go 0 4 0.0%
billing/plan/service.go 0 29 0.0%
internal/store/postgres/billing_plan_repository.go 0 137 0.0%
Totals Coverage Status
Change from base Build 11068941298: -0.01%
Covered Lines: 10995
Relevant Lines: 113287

💛 - Coveralls

@anujk14 anujk14 changed the title [Draft] [Optimization] Reduce DB calls in Plan list API feat: reduce DB calls in Plan list API Sep 23, 2024
@anujk14 anujk14 changed the title feat: reduce DB calls in Plan list API feat: reduce DB calls in plan list API Sep 23, 2024
billing/plan/service.go Outdated Show resolved Hide resolved
billing/plan/service.go Outdated Show resolved Hide resolved
@anujk14 anujk14 merged commit cfd0de7 into main Sep 30, 2024
7 checks passed
@anujk14 anujk14 deleted the IDE-573-detailed-plan-list branch September 30, 2024 09:26
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.

3 participants