SQL Monster Selector is a lightweight, fast VSCode extension designed to enhance your SQL development experience. It provides intelligent and flexible selection of SQL query portions, making it easier to work with complex queries in interactive environments like DuckDB or Apache Spark SQL.
Features
Smart SQL Selection: Expand or shrink your selection based on SQL query structure.
Lightweight: Uses a set of rules instead of a full SQL parser, ensuring speed and minimal resource usage.
Interactive Console Friendly: Perfect for working with DuckDB, Apache Spark SQL, and other interactive query consoles.
Customizable Keybindings: Easily expand or shrink your selection with customizable keyboard shortcuts.
How It Works
SQL Monster Selector uses a set of intelligent rules to understand the structure of your SQL queries:
Expansion:
Starts by selecting subqueries or nested queries.
Expands to full SQL statements (SELECT, INSERT, UPDATE, DELETE).
Continues expanding to include outer queries and full blocks.
Shrinking:
Reverses the expansion process, narrowing down the selection step by step.
Block Recognition:
Identifies SQL blocks separated by blank lines, semicolons, or comments.
Usage
Place your cursor within a SQL query.
Use Ctrl+Shift+] to expand the selection.
Use Ctrl+Shift+[ to shrink the selection.
For maximum convenience, add the following keybinding to your VSCode keybindings.json file:
Speed: By using a rule-based approach instead of a full SQL parser, SQL Monster Selector provides lightning-fast selections.
Flexibility: Works with various SQL dialects and interactive environments.
Efficiency: Streamlines your workflow when working with complex, nested queries.
Visual Feedback: Provides a preview of the next expansion, helping you navigate large SQL scripts effortlessly.
Perfect for data analysts, database administrators, and developers working with SQL in interactive environments. SQL Monster Selector shines when you need to quickly select and execute portions of large, complex queries.