Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
- Coverage 78.84% 78.53% -0.32%
==========================================
Files 16 16
Lines 1418 1444 +26
==========================================
+ Hits 1118 1134 +16
- Misses 300 310 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
01dec74 to
70ae493
Compare
70ae493 to
4d1b6cb
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds comparison operators to the Record class and includes related test cases while refactoring several components such as cursor iteration and long value lookup using a new BTree implementation. Key changes include:
- Introducing rich comparison methods (eq, lt, etc.) in Record.
- Adding tests for Record comparisons, table index searches, and cursor navigation.
- Refactoring long value retrieval in Table and streamlining repr methods across classes.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_table.py | Added tests for the new find_index functionality |
| tests/test_record.py | Added tests for Record comparison operators |
| tests/test_index.py | Updated tests for index search behavior including binary values handling |
| tests/test_cursor.py | Added tests for new cursor methods using BTree |
| dissect/esedb/tools/sru.py | Updated repr formatting for Entry |
| dissect/esedb/table.py | Added primary_index property, cursor method, and find_index improvements |
| dissect/esedb/record.py | Added comparison operators and updated _parse_multivalue return type to list[bytes] with new error handling |
| dissect/esedb/page.py | Modified Tag repr formatting |
| dissect/esedb/index.py | Refactored index flag handling and repr improvements |
| dissect/esedb/cursor.py | Refactored cursor implementation to work with BTree |
| dissect/esedb/c_esedb.py | Added new flag definitions |
| dissect/esedb/btree.py | New BTree helper class for B+Tree navigation |
Comments suppressed due to low confidence (2)
tests/test_index.py:86
- The test for 'IxLongBinary' now uses 1000 repetitions of 'a' instead of the previous 1024. Please verify that this change in expected binary length is intentional.
record = table.indexes[14].search(LongBinary=b"test long binary data " + (b"a" * 1000))
dissect/esedb/record.py:324
- The _parse_multivalue function now raises a ValueError for unknown tag field flags. Confirm that raising an exception here is the desired behavior for handling unrecognized flags.
raise ValueError(f"Unknown flags for tag field: {tag_field}")
4d1b6cb to
d295381
Compare
acc6656 to
43113b4
Compare
27390c5 to
d51d52c
Compare
Closes #40
Depends on #36.