Repository navigation
v4.5.0
New Features
- Row class: New dict subclass with attribute access support
- Access values with dot notation:
row.nameor dict syntax:row['name'] - Fully compatible with dict operations (keys, values, items, etc.)
- Nice repr for debugging
- Access values with dot notation:
Breaking Changes
- map_results() return type: Now returns
List[Row]instead of mutating in place- Before:
query.map_results(rows)mutated rows in place - After:
results = query.map_results(rows)returns new Row objects - Migration: Update code to use the return value instead of relying on mutation
- Before:
Bug Fixes
- asyncpg Record support: Fixed issue where immutable asyncpg Records would crash map_results
- Now converts all input types (dict, Record, etc.) to Row objects
- Consistent API regardless of database driver
Why This Change
asyncpg Record objects are immutable C extensions that cannot be modified in place. The new Row class provides a consistent, mutable return type with a nicer API (attribute access) while maintaining full dict compatibility.