ID Mapping Store
Component Detail
Data Layer
medium complexity
mobile
1
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Drift table and DAO that persists client-generated temporary UUID to server-assigned permanent ID mappings. Records entity type alongside each mapping to scope back-patching operations correctly. Cleaned up incrementally as mappings are resolved after successful sync.
id-mapping-store
Responsibilities
- Store temp-ID, server-ID, entity-type, and resolution status per mapping record
- Query unresolved mappings for back-patching after sync confirmation
- Support bulk resolution updates within a single Drift transaction
- Garbage-collect resolved entries to keep the table bounded
Interfaces
insert(tempId, entityType): Future<void>
resolve(tempId, serverId): Future<void>
getUnresolved(): Future<List<IdMapping>>
deleteResolved(): Future<void>
Relationships
Dependencies (1)
Components this component depends on