-
-
Notifications
You must be signed in to change notification settings - Fork 119
[Feature Request] Support sequential execution of multi-line SQL and granular execution feedback #514
Description
Problem
Here is the English version of the issue, following standard open-source contribution practices. This version uses more professional technical terminology (e.g., "Sequential Execution," "Granular Feedback") to ensure the maintainers take it seriously.
Title: [Feature Request] Support sequential execution of multi-line SQL and granular execution feedback
Problem Description
Currently, in the tablePro query interface, when multiple SQL statements are entered, the system only executes the first line or treats the entire input as a single statement. This makes it difficult to perform operations that require continuous steps (e.g., creating a temporary table, inserting data, and then querying) or bulk data updates.
Feature Description
I would like to suggest that the query interface support parsing and sequential execution of multi-line SQL with the following capabilities:
Sequential Execution: Execute SQL statements separated by semicolons (;) one by one according to the input order.
Execution Feedback: Provide clear status feedback (Success/Failure) for each individual line in the results panel.
Result Differentiation:
For SELECT statements: Display the corresponding result set.
For INSERT/UPDATE/DELETE statements: Display the number of affected rows.
For failed statements: Display the specific error message/stack trace for that line without necessarily blocking the execution of subsequent unrelated statements (or provide a "Stop on Error" toggle).
User Experience (Example)
Input:
SQL
UPDATE users SET status = 1 WHERE id = 1;
SELECT * FROM non_existent_table;
SELECT name FROM users WHERE id = 1;
Expected Output:
Query 1: ✅ Success. Affected rows: 1.
Query 2: ❌ Error: Table 'non_existent_table' doesn't exist.
Query 3: ✅ Success. [Result Table]
Proposed solution
No response
Alternatives considered
No response
Related database type
None