declarative_sqlite 1.1.0
declarative_sqlite: ^1.1.0 copied to clipboard
A dart package for declaratively creating SQLite tables and automatically migrating them.
1.1.0 #
Features #
- Non-LWW Column Protection: Added protection against updating non-LWW columns on server-origin rows
- Prevents data corruption in distributed systems by restricting updates to LWW columns only on rows that originated from server
- Local-origin rows can still update all columns freely
- Throws
StateError
when attempting to update non-LWW columns on server-origin rows - Enhanced
DbRecord.setValue()
with origin validation
- Improved Dirty Row Tracking: Enhanced dirty row tracking to differentiate between full row updates (local origin) and partial updates (server origin)
Data Safety #
- Added
isLocalOrigin
property toDbRecord
for checking row origin - Enhanced synchronization safety with column-level update restrictions
- Maintained backward compatibility for existing local data operations
1.0.2 #
Breaking Changes #
- Removed foreign key functionality from KeyBuilder and DbKey classes
- Foreign key constraint handling removed from exception system
- Architecture now favors application-level relationship management
Documentation #
- Updated all documentation to remove foreign key references
- Improved examples focusing on application-domain relationships
1.0.1 #
Features #
- Complete rewrite with simplified, reactive database operations
- Declarative schema definition with automatic table creation
- Query builder with type-safe operations
- Streaming queries for reactive UIs
- File repository integration
- Comprehensive test coverage
API Changes #
- Removed transaction support for simplicity
- Removed sync manager and HLC support
- Streamlined
DeclarativeDatabase.open()
method - Updated query methods:
query()
,queryMaps()
,streamRecords()
- Simplified schema building with
SchemaBuilder
Documentation #
- Updated all examples to use current API
- Added comprehensive test suite
- Updated README with correct usage patterns