Data Layer medium complexity mobile
1
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Drift database table representing the ordered mutation queue persisted on device. Each row holds the operation type, target entity type and ID, serialized payload, attempt count, and last-attempt timestamp, providing the durable foundation for retry and backoff logic.

Feature: Background Sync

sync-queue-table

Sources & reasoning

The implementation notes specify an ordered Drift table as the backing store for the sync queue with fields for operation type, target entity, serialized payload, attempt count, and last-attempt timestamp. This data component encapsulates that schema and provides the repository interface consumed by the Sync Queue Service.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Persist queued mutations with full operation metadata for reliable retry
  • Track per-entry attempt count and last-attempt timestamp to drive exponential backoff
  • Provide ordered (FIFO) queue semantics for deterministic processing by the Sync Queue Service
  • Support deletion of successfully uploaded entries to keep the queue lean

Interfaces

insertMutation(entry: SyncQueueEntry): Future<int>
getPendingMutations(): Future<List<SyncQueueEntry>>
updateAttempt(id: int, attemptCount: int, lastAttempt: DateTime): Future<void>
deleteMutation(id: int): Future<void>
clearAll(): Future<void>

Relationships

Dependencies (1)

Components this component depends on