Add 210 behavioral tests and fix data safety regressions - #194
Merged
Merged
Conversation
Add 210 test cases for actual SQLite data/schema changes, provider command contracts, data-transfer validation, metadata decoding, logging, and nullable record conversions. Verify persisted rows, constraint definitions, rollback, parameter types, reader/command disposal, and borrowed connection ownership. Fix defects exposed by the new tests: - Group view fields by relationship, assign distinct join aliases, qualify base-table columns, and honor explicit parent aliases in chained joins. - Generate IS NULL predicates for parameterized deletes and reject missing, empty, or mismatched predicate arrays before SQL execution. Missing values must never turn a filtered delete into a whole-table delete. - Rebuild SQLite fallback column renames and their dependent tables in one transaction, update self-referencing keys, and preserve caller transactions. - Implement atomic SQLite removal of incoming/outgoing foreign keys for a column, preserving unrelated constraints and restoring foreign-key settings. Validation: all 1,100 Unit + SQLite tests pass, with no failures or skips; git diff --check passes. Same-filter Coverlet comparison against b540baf: - Line coverage: 48.14% (5,047/10,484) -> 56.13% (5,918/10,543). - Branch coverage: 41.22% (2,132/5,172) -> 49.87% (2,608/5,230). - Passing tests: 890 -> 1,100. Coverage configuration and exclusions are unchanged. These local results exclude external database suites; the full CI matrix must establish the new combined coverage percentage. MySQL/MariaDB metadata and cross-provider SQL contract tests supplement, rather than replace, live engine validation.
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.
Summary
Add 210 behavioral test cases for previously uncovered database operations and fix the defects they expose. Assertions verify persisted rows, schema constraints, rollback, typed parameters, and resource ownership.
Fixes exposed by the tests
IS NULL, with correct binding for other values.Added test coverage
Validation
1,100 Unit + SQLite tests passed; 0 failures and 0 skips.
git diff --checkpassed.Same-filter Coverlet comparison against
b540baf, using unchanged.github/coverage.runsettings:These are local Unit + SQLite results, not the combined database coverage figure of approximately 80%. The full database CI matrix must establish the new combined percentage. No coverage exclusions were added. Provider contract tests supplement live engine validation.
Compatibility
Malformed structured delete predicates now throw argument exceptions instead of silently deleting all rows or reaching the database. Intentional whole-table deletion remains supported by omitting both predicate arrays.