feat(fuzzy-finder): add role completion for USE <db> ROLE statement#516
feat(fuzzy-finder): add role completion for USE <db> ROLE statement#516
Conversation
Add fuzzy completion support for database roles in the USE statement. When typing `USE <db> ROLE <Ctrl+T>`, the fuzzy finder lists available database roles via the ListDatabaseRoles admin API. Fixes #513 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @apstndb, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the command-line interface by integrating fuzzy completion for database roles within the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Code Metrics Report📊 View detailed coverage report (available for 7 days)
Details | | main (4beb392) | #516 (853d721) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 68.2% | 68.0% | -0.2% |
| Files | 55 | 55 | 0 |
| Lines | 5912 | 5929 | +17 |
| Covered | 4036 | 4036 | 0 |
- | Code to Test Ratio | 1:1.2 | 1:1.2 | -0.1 |
| Code | 13574 | 13611 | +37 |
+ | Test | 16928 | 16960 | +32 |
+ | Test Execution Time | 1m12s | 1m4s | -8s |Code coverage of files in pull request scope (53.9% → 51.6%)
Reported by octocov |
There was a problem hiding this comment.
Code Review
This pull request introduces fuzzy completion for database roles when using the USE <db> ROLE ... statement. The implementation adds a new fuzzyCompleteRole type, defines the corresponding regex pattern for detection, and implements the fetchRoleCandidates function to retrieve roles via the ListDatabaseRoles admin API. The changes are consistent with the existing fuzzy-finder architecture and include new tests to validate the behavior. No issues were found that contradict existing code review rules.
Summary
Add fuzzy completion support for database roles in the
USEstatement. When typingUSE <db> ROLEand pressing Ctrl+T, the fuzzy finder lists available database roles via theListDatabaseRolesadmin API.Key Changes
fuzzyCompleteRoleenum value and role completion pattern forUSE <db> ROLE <partial>(ordered before database pattern for correct specificity)fetchRoleCandidates()usingListDatabaseRolesAPI with sorted resultsTest Plan
make checkpasses (test + lint + fmt-check)Fixes #513