Notes Table
Component Detail
Data Layer
low complexity
mobile
0
Dependencies
2
Dependents
0
Entities
0
Integrations
Description
Drift DAO and table definition for the local SQLite notes store. Provides reactive queries filtered by user and supports the mutation outbox pattern for offline-created or offline-edited notes pending sync.
notes-table
Responsibilities
- Define Drift table schema for notes (id, user_id, contact_id, title, body, created_at, updated_at, synced)
- Expose watchAllForUser() reactive stream for live UI updates
- Support paginated queries for users with large note collections
- Integrate with mutation outbox for offline write queuing
Interfaces
watchAllForUser(String userId) → Stream<List<Note>>
getPage(String userId, int offset, int limit) → Future<List<Note>>
insertOrReplace(Note note) → Future<void>
deleteById(String noteId) → Future<void>
markSynced(String noteId) → Future<void>