Notes Repository
Component Detail
Data Layer
low complexity
mobilebackend
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Data access layer that wraps all database operations for the notes table, including CRUD operations, soft-delete support, and FTS5 full-text search index management. Provides both remote (REST API) and local (SQLite offline queue) data sources, enabling offline creation and sync of notes.
notes-repository
Responsibilities
- Execute CRUD queries against the notes database table
- Implement soft-delete by setting deleted_at timestamp
- Manage FTS5 index entries for note content to enable offline search
- Queue note mutations when offline and sync on reconnect
Interfaces
findByContact(contactId)
findById(noteId)
insert(note)
update(noteId, content)
softDelete(noteId)
searchFullText(query, contactId?)
getPendingSync()
markSynced(noteId)