Data Layer low complexity mobile
0
Dependencies
3
Dependents
0
Entities
0
Integrations

Description

Drift table definition and repository for note_attachments records. Each row stores a reference to a note (note_id), the local file path for offline access, the remote URL after successful upload, MIME type, file size, and sync status. Provides typed query methods used by the Note Attachment Upload Service and Note Attachment Manager Widget.

Feature: Note Editor

note-attachments-table

Responsibilities

  • Define Drift table schema for note_attachments with local path and remote URL columns
  • Provide insert, update, and delete query methods with type-safe Drift DAOs
  • Expose a watch stream per note_id for reactive UI updates in the attachment widget
  • Support cascade deletion when parent note is deleted locally

Interfaces

insertAttachment(record: NoteAttachmentCompanion) -> Future<int>
updateRemoteUrl(attachmentId: int, remoteUrl: String) -> Future<void>
deleteAttachment(attachmentId: int) -> Future<void>
watchByNoteId(noteId: String) -> Stream<List<NoteAttachment>>
getPendingUploads() -> Future<List<NoteAttachment>>

Relationships

Dependents (3)

Components that depend on this component