notes
Component Detail
Data Layer
low complexity
Shared Component
mobile
0
Dependencies
2
Dependents
0
Entities
0
Integrations
Description
Drift table adapter and repository for the notes entity, providing typed access to note records linked to contacts and users. Handles local persistence, reads for list and detail views, and exposes reactive streams for Riverpod state management. Shared with the Notes List feature which also reads this table.
notes
Sources & reasoning
The notes table is the canonical data layer for both Notes List and Note Editor features. Extracting it as a shared Drift repository avoids duplication and provides a single source of truth for note persistence across both features.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Persist and retrieve note records from the local Drift database
- Expose reactive streams for note state changes
- Map between domain Note model and Drift table rows
Interfaces
insertNote(note: NoteCompanion): Future<int>
updateNoteById(id: String, content: String): Future<int>
deleteNoteById(id: String): Future<int>
watchNoteById(id: String): Stream<Note?>
findNotesByContactId(contactId: String): Future<List<Note>>
Relationships
Dependents (2)
Components that depend on this component