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

Features - Implement Auto-Suggestion - SQL Editor #49

Merged
merged 6 commits into from
Oct 20, 2024

Conversation

Victor1890
Copy link
Contributor

SQL Studio - Auto-Suggestions Feature

Description of the PR

This PR introduces a new SQL Auto-Suggestion feature in SQL Studio. This feature improves the user experience by providing real-time SQL code suggestions as you type, helping you write queries faster and with fewer errors.

Key Features

  • Contextual Suggestions: Get relevant suggestions based on the current context within your SQL query.
  • Multiple Database Support: Auto-suggestions work seamlessly across supported databases, including SQLite, libSQL, PostgreSQL, MySQL/MariaDB, DuckDB and ClickHouse.
  • Productivity Improvement: Spend less time writing repetitive SQL code and more time analyzing your data.
  • Error Reduction: Minimize syntax errors and improve query accuracy with intelligent suggestions.

How to Use

  1. Start Typing: Start typing your SQL query in the query editor.
  2. View Suggestions: As you type, a drop-down menu will appear with suggestions for completing your query.
  3. Select Suggestion: Use your keyboard to navigate through the suggestions, and press Enter to select.

Example

Here is a quick example of how the auto-suggest feature works:

recording.mp4

Feedback

We would love to hear your feedback on the new auto-suggest feature 😁.

This commit adds the "monaco-sql-languages" package to the project's dependencies. This package provides support for SQL language features in the Monaco editor. It is added to the "ui/package.json" file.
… provider

This commit refactors the code in the editor component to update the monaco-sql-languages package and add a completion item provider for SQL language. The completion item provider provides suggestions for auto-completion in the editor. The implementation currently includes suggestions for auto-suggestions, but the tables, columns, and tables with columns suggestions are yet to be implemented. This commit also removes the unused code related to tables and columns suggestions.
@frectonz
Copy link
Owner

Thank you very much for implementing this 🙇. This really takes the project to another level.

@frectonz frectonz merged commit 2a1aa2a into frectonz:main Oct 20, 2024
6 of 7 checks passed
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.

2 participants