feat: soft-split SQL statements at 2+ blank lines when ; is missing - #124
Merged
Conversation
When statements are separated by 2+ blank lines followed by a SQL keyword (SELECT, INSERT, CREATE, etc.), automatically split them into separate statements even without a ; delimiter. This recovers gracefully from forgotten semicolons between queries.
Blankll
force-pushed
the
feat/soft-split-missing-semicolon
branch
4 times, most recently
from
July 28, 2026 14:32
eaafac4 to
8dd7e58
Compare
When statements are separated by 2+ blank lines followed by a SQL keyword, auto-split into separate statements even without ; delimiter. Also handles comment lines between blank lines, and suppresses false splits for CTE main queries (WITH ... AS (...) \n\n\n SELECT ...).
Blankll
force-pushed
the
feat/soft-split-missing-semicolon
branch
from
July 28, 2026 14:32
8dd7e58 to
e97e6aa
Compare
…on-existent i-carbon-refresh)
…l icons and separator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
1. Soft-split SQL statements at blank lines (当
;忘记时自动分割)Added
splitRangesAtBlankLines()that runs after the standard;-based split. When 2+ consecutive blank lines are followed by a SQL keyword, the range is split at that point.Split keywords: SELECT, CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, TRUNCATE, GRANT, REVOKE, EXPLAIN, SHOW, DESCRIBE, USE, SET, CALL, EXEC/EXECUTE, BEGIN, COMMIT, ROLLBACK, DECLARE, ANALYZE, VACUUM, PRAGMA, REFRESH, COPY, WITH, MERGE, REPLACE
Safety: Requires 2+ blank lines (not 1) — a single blank line within a multi-line statement won't split it.
CTE protection: When the segment starts with
WITH, suppresses soft-split for the next DML keyword (SELECT/INSERT/UPDATE/DELETE) since it's the main query of a CTE, not a new statement.2. Table view toolbar fixes
i-carbon-refreshdoes not exist in Carbon icons → changed toi-carbon-renew(same icon as "Reload database list")<button>inside<button>) — properly separatedvariant="ghost"like other toolbar icon buttons3. Export filename format
Default CSV export filename changed from
{tableName}.csvto{connectionName}-{databaseName}-{schema?}-{tableName}-{timestamp}.csvVerification