Local SQLite Database
Component Detail
Data Layer
high complexity
mobile
1
Dependencies
5
Dependents
0
Entities
0
Integrations
Description
Device-local SQLite database managed via the drift or sqflite Flutter package. Maintains a schema mirroring the server-side data model for the offline-eligible entity subset - activities, contacts, and events - with additional columns for sync status and local version tracking. All data is encrypted at rest via the secure storage adapter.
local-sqlite-database
Responsibilities
- Persist activities, contacts, and events for offline access
- Track sync status and pending operation type per row
- Support schema migrations as the server model evolves
- Store local version vectors for conflict detection
Interfaces
insertOrReplace(String table, Map<String, dynamic> row): Future<void>
queryById(String table, String id): Future<Map<String, dynamic>?>
queryAll(String table, {Map<String, dynamic>? where}): Future<List<Map<String, dynamic>>>
delete(String table, String id): Future<void>
runMigration(int fromVersion, int toVersion): Future<void>
Relationships
Dependents (5)
Components that depend on this component