Skip to content

Fix: SQL editor executes entire file instead of selection - #212

Closed
ZhuchkaTriplesix wants to merge 1 commit into
mainfrom
bugfix/211-sql-editor-selection
Closed

Fix: SQL editor executes entire file instead of selection#212
ZhuchkaTriplesix wants to merge 1 commit into
mainfrom
bugfix/211-sql-editor-selection

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #211.

Changes:

  1. Modified postgres_sql_workspace.dart, mysql_sql_workspace.dart, and sqlite_sql_workspace.dart to execute only the highlighted text if there is an active selection.
  2. Modified sqlite_connection.dart to use regular expressions to strip out SQL comments (-- and /* ... */) before checking if a query starts with SELECT or PRAGMA, fixing a bug that returned empty sets for valid queries with leading comments.

@ZhuchkaTriplesix ZhuchkaTriplesix added the bug Something isn't working label Jun 21, 2026
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the bugfix/211-sql-editor-selection branch July 26, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: SQL editor executes entire file instead of selection, breaking multi-statement queries

1 participant