Skip to content

feat(fuzzy-finder): add table completion for DUMP TABLES and SHOW CREATE TABLE#529

Open
apstndb wants to merge 1 commit intomainfrom
issue-518-table-completion
Open

feat(fuzzy-finder): add table completion for DUMP TABLES and SHOW CREATE TABLE#529
apstndb wants to merge 1 commit intomainfrom
issue-518-table-completion

Conversation

@apstndb
Copy link
Owner

@apstndb apstndb commented Feb 26, 2026

Summary

Add fuzzyCompleteTable completion to two statements that accept table name arguments but previously lacked fuzzy completion.

Key Changes

  • client_side_statement_def.go: Add Completion entry to DUMP TABLES with regex supporting comma-separated multi-table input; add fuzzyCompleteTable to SHOW CREATE's existing completion list for TABLE type
  • fuzzy_finder_test.go: Add 8 test cases (5 for DUMP TABLES including comma-separated scenarios, 3 for SHOW CREATE TABLE)

Test Plan

  • make check passes
  • Manual testing completed

Fixes #518

…ATE TABLE

Add fuzzyCompleteTable completion to two statements that accept table
name arguments but previously lacked fuzzy completion:

- DUMP TABLES: supports comma-separated multi-table completion
- SHOW CREATE TABLE: reuses existing SHOW CREATE completion list

Fixes #518

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 table completion for the DUMP TABLES and SHOW CREATE TABLE statements. This improvement allows users to more efficiently specify table names, including multiple tables for DUMP TABLES, by leveraging intelligent suggestions.

Highlights

  • DUMP TABLES completion: Implemented fuzzy table completion for the DUMP TABLES statement, including support for comma-separated multiple table inputs.
  • SHOW CREATE TABLE completion: Added fuzzy table completion to the SHOW CREATE TABLE statement.
  • Test coverage: Expanded test suite with 8 new cases covering various scenarios for DUMP TABLES (including multi-table input) and SHOW CREATE TABLE.
Changelog
  • internal/mycli/client_side_statement_def.go
    • Added a Completion entry for DUMP TABLES to enable fuzzy table completion, supporting comma-separated table names.
    • Integrated fuzzyCompleteTable into the existing completion list for SHOW CREATE TABLE.
  • internal/mycli/fuzzy_finder_test.go
    • Introduced 5 new test cases for DUMP TABLES to verify fuzzy completion for single and multiple table inputs, including partial and lowercase entries.
    • Added 3 new test cases for SHOW CREATE TABLE to ensure fuzzy completion works correctly with partial and lowercase table names.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request since its creation.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

Code Metrics Report

📊 View detailed coverage report (available for 7 days)

main (2db3383) #529 (d930775) +/-
Coverage 67.6% 67.6% 0.0%
Code to Test Ratio 1:1.2 1:1.2 +0.0
Test Execution Time 1m11s 1m6s -5s
Details
  |                     | main (2db3383) | #529 (d930775) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          67.6% |          67.6% | 0.0% |
  |   Files             |             55 |             55 |    0 |
  |   Lines             |           6074 |           6074 |    0 |
  |   Covered           |           4108 |           4108 |    0 |
+ | Code to Test Ratio  |          1:1.2 |          1:1.2 | +0.0 |
  |   Code              |          13939 |          13947 |   +8 |
+ |   Test              |          17340 |          17396 |  +56 |
+ | Test Execution Time |          1m11s |           1m6s |  -5s |

Code coverage of files in pull request scope (77.2% → 77.2%)

Files Coverage +/- Status
internal/mycli/client_side_statement_def.go 77.2% 0.0% modified

Reported by octocov

@apstndb apstndb added enhancement New feature or request fuzzy-finder Fuzzy finder (fzf) completion features labels Feb 26, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces fuzzy-finder completion for DUMP TABLES and SHOW CREATE TABLE statements. For DUMP TABLES, a completion definition is added with a regular expression that supports comma-separated table names. For SHOW CREATE TABLE, a completion definition is added to the existing SHOW CREATE statement block, consistent with other object types. The pull request also includes new test cases in fuzzy_finder_test.go that validate the completion logic for both statements under various input conditions. No issues were found during the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fuzzy-finder Fuzzy finder (fzf) completion features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fuzzy completion: DUMP TABLES and SHOW CREATE TABLE table completion

1 participant