fix(result-set): isolate table edits from query execution options - #2877
Merged
Merged
Conversation
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.
Related issue
Closes #2876
Summary
Editing multiple rows in a result produced by a current-statement query could inherit
single=true, causing the generated updates to be sent as one statement. This fails on MySQL connections with multi-statement execution disabled while the same SQL succeeds when run as a script in the editor.Build result-edit requests from datasource, database and schema context only, and use the existing table-edit update API for direct submission, matching SQL-preview execution. Preserve pending-request protection and the direct desktop submission's disabled timeout. Add parameter-isolation regression coverage to the existing result-set test command.
Affected surfaces
The CI/build change only adds the regression test to an existing package script; no workflow or packaging implementation changes.
Verification
yarn test:result-set-ui,yarn lint,yarn run build:web:community --app_version=0.0.0, andgit diff --checkpassed locally. The result-set tests and lint were also run in the isolated PR worktree.allowMultiQueries=false. Verified current-statement SELECT (single=true), two-row updates, direct and SQL-preview execution, preview cancellation without a write, second-statement failure feedback with edits retained, rapid double-click producing exactly one request, Cmd+S submission, and values after refresh. Inspected request bodies, responses and actual database rows; browser console had no errors. All temporary browser/server/database fixtures were removed.dataSourceId,databaseNameand the generated SQL for the tested schema-less connection; no query execution options were forwarded.Risk and compatibility
/api/rdb/dml/execute_updatecontract; no schema or stored-data migration.Reviewer map
chat2db-community-client/src/blocks/SearchResult/components/SQLPreviewExecute/updateSql.tsfor the explicit request boundary, thenindex.tsxfor the dedicated execution API.src/service/executeSql.tsretains the direct desktop submission timeout behavior.single=true, edit at least two rows, and ensure neither SQL generation nor execution inheritssingle, pagination,explain,errorContinue, console, approval or result identifiers. A later-statement failure must not report success.Contributor declaration
AI assistance: Codex implemented the change and performed source review, automated checks and Playwright CLI verification under maintainer direction.