Skip to content

Improve SQLite3 primary key constraint parsing - #24

Merged
Schamper merged 4 commits into
fox-it:mainfrom
JSCU-CNI:sqlite-pk-constraint-multi-part
Feb 4, 2026
Merged

Schamper merged 4 commits into
fox-it:mainfrom
JSCU-CNI:sqlite-pk-constraint-multi-part

Conversation

@JSCU-CNI

@JSCU-CNI JSCU-CNI commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

This PR fixes SQLite3 table parsing for tables with primary keys defined in a table constraint. Specifically, constraints with multiple parts (but whom are not compound/composite or an expression). See the added test for an example.

@codecov

codecov Bot commented Feb 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (64ae6d8) to head (4202573).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/database/sqlite3/util.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #24   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        146     146           
  Lines       3881    3880    -1     
=====================================
+ Misses      3881    3880    -1     
Flag Coverage Δ
unittests 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Schamper Schamper left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stellar docstrings on this code 😄 took me a little bit to understand exactly what this was handling. I don't expect you to document all this old code but at least adding a comment on what your change handles would be very much appreciated.

I know the unit test also shows it, but showing it briefly in the code makes the code much easier to reason about.

Comment thread dissect/database/sqlite3/util.py
@JSCU-CNI
JSCU-CNI requested a review from Schamper February 3, 2026 17:45
@codspeed

codspeed Bot commented Feb 3, 2026 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing JSCU-CNI:sqlite-pk-constraint-multi-part (4202573) with main (64ae6d8)

Summary

✅ 6 untouched benchmarks

@Schamper Schamper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the linter?

@JSCU-CNI
JSCU-CNI requested a review from Schamper February 4, 2026 09:43
@Schamper
Schamper merged commit f75cabe into fox-it:main Feb 4, 2026
21 checks passed
@JSCU-CNI
JSCU-CNI deleted the sqlite-pk-constraint-multi-part branch February 4, 2026 13:07
twiggler pushed a commit to twiggler/dissect-monorepo-test that referenced this pull request May 26, 2026
twiggler pushed a commit to twiggler/dissect-monorepo-test that referenced this pull request Jun 4, 2026
twiggler pushed a commit to twiggler/dissect-monorepo-test that referenced this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants