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

Simplify org autocomplete query for performance #1574

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Conversation

sausage-todd
Copy link
Contributor

@sausage-todd sausage-todd commented Sep 28, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 6442a33

Improved the autocomplete feature for organizations in the backend by using a raw SQL query, input validation, and logging. Refactored the findAllAutocomplete method of the OrganizationService class and moved the query logic to the organizationRepository.ts file.

🤖 Generated by Copilot at 6442a33

Sing, O Muse, of the skillful coder who refined
the autocomplete feature for organizations, and brought
a swift and elegant solution to the eager users, like
the wise Athena aiding the noble Odysseus.

Why

How

🤖 Generated by Copilot at 6442a33

  • Refactor and improve the autocomplete feature for organizations (link, link, link, link)
  • Import the validator module and the logExecutionTimeV2 function to validate query parameters and measure execution time (link, link)
  • Replace the Sequelize methods with a raw SQL query in the findAllAutocomplete method of the organizationRepository.ts file to optimize the performance and accuracy of the autocomplete feature (link)
  • Simplify the findAllAutocomplete method of the organizationService.ts file to call the repository method directly and avoid duplication (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@sausage-todd sausage-todd merged commit 696ba02 into main Sep 28, 2023
8 checks passed
@sausage-todd sausage-todd deleted the autocomplete branch September 28, 2023 16:06
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.

None yet

1 participant