Skip to content

Conversation

@tbhb
Copy link
Contributor

@tbhb tbhb commented Jan 2, 2026

Summary

  • Add dictionary-like access to Table and Transaction classes (table[key], table[key] = record, del table[key])
  • Add pop(), popitem(), setdefault(), and update() methods
  • Consolidate ReadableMixin into TableMixin for cleaner architecture
  • Register TableMixin as a virtual MutableMapping subclass to maintain JSONLT's sorted iteration semantics

Test plan

  • Unit tests for all new dictionary operations on Table
  • Unit tests for all new dictionary operations on Transaction
  • Type checking passes (basedpyright)
  • All pre-commit hooks pass
  • CI passes

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 2, 2026

CodSpeed Performance Report

Merging #15 will not alter performance

Comparing feat/dictionary-access (21b0f25) with main (8c044a7)

Summary

✅ 173 untouched

Add support for dictionary operations on tables and transactions:
- `table[key]`, `table[key] = record`, `del table[key]`
- `pop()`, `popitem()`, `setdefault()`, `update()`

Consolidate ReadableMixin into TableMixin which provides the full
interface for both Table and Transaction classes. Register TableMixin
as a virtual MutableMapping subclass to maintain JSONLT's sorted
iteration semantics while passing isinstance checks.
@tbhb tbhb force-pushed the feat/dictionary-access branch from 458689b to 21b0f25 Compare January 2, 2026 06:27
@tbhb tbhb merged commit a51a249 into main Jan 2, 2026
30 checks passed
@tbhb tbhb deleted the feat/dictionary-access branch January 2, 2026 06:33
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