Skip to content

Fix: Support for DESCRIBE and SHOW COLUMNS queries #38

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paolobiancalana
Copy link

I made two important improvements:

  1. Schema query support:
  • Added specific handling for DESCRIBE, DESC, SHOW COLUMNS and SHOW FIELDS
  • Implemented correct formatting of these query results
  • Added conversion of NULL values to readable "NULL" strings
  1. Code architecture improvements:
  • Rearranged input validation to improve tests
  • Added query normalization for more reliable detection
  • Improved handling of empty results

Tests
Passed all automated tests and manually tested with:

  • DESCRIBE bookings
  • SHOW COLUMNS FROM bookings
  • DESC bookings
  • SHOW FIELDS FROM bookings

Impact
This change significantly improves the user experience with LLM models that tend to use these commands to explore database structure, eliminating frustration and confusion caused by "Unread result found" errors.

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.

1 participant