fix(grid): enforce exact single-row match in expectDmlMatchedRows (#896) - #959
Merged
Merged
Conversation
…oses #896) Staged UPDATE/DELETE statements target one row. Matching 2+ rows (duplicates in an unkeyed table) previously passed the `>= 1` check and silently rewrote all of them. Now anything other than exactly 1 affected row throws, so the surrounding transaction rolls back. SQLite implicit rowid addressing already landed in #774; tests added to cover rowid WHERE generation and the duplicate-row rollback.
ZhuchkaTriplesix
force-pushed
the
issue/896-sqlite-rowid-single-row-dml
branch
from
September 25, 2026 10:17
f091a99 to
3858a11
Compare
This was referenced Sep 25, 2026
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.
Описание изменений
expectDmlMatchedRowsтеперь требуетaffectedRows == 1. Раньше>= 1пропускал UPDATE/DELETE, затронувшие дубликаты в таблице без ключа, и молча портил все совпавшие строки. Транзакция откатывается, пользователь видит понятную ошибку.rowid(п.1 issue) уже была добавлена в fix(sqlite): allow Table Browser edits on implicit rowid tables #774 / fix(sqlite): edit Table Browser rows via implicit rowid #865. Здесь добавлены тесты на генерациюWHERE "rowid" = …и на поведение с дубликатами.table_view_staging_test,table_mutation_engine_test,sqlite_connection_test,extension_table_view_test.Связанные Issue
Closes #896
Примечание
Для PG/MySQL таблиц без PK с дубликатами Save теперь падает вместо тихой порчи данных. Тесты не запускались локально (есть CI),
dart analyzeчистый.🤖 Generated with Claude Code