refactor: migrate :core:database to Room Kotlin Multiplatform (#4702)

This commit is contained in:
James Rich
2026-03-03 20:44:34 -06:00
committed by GitHub
parent 744db2d5bd
commit 6a858acb4a
42 changed files with 406 additions and 264 deletions
+5 -5
View File
@@ -1,17 +1,17 @@
# `:core:database`
This module provides the local Room database persistence layer for the application.
This module provides the local Room database persistence layer for the application using Room Kotlin Multiplatform (KMP).
## Key Components
- **`MeshtasticDatabase`**: The main Room database class.
- **`MeshtasticDatabase`**: The main Room database class, defined in `commonMain`.
- **DAOs (Data Access Objects)**:
- `NodeInfoDao`: Manages storage and retrieval of node information (`NodeEntity`). Contains critical logic for handling Public Key Conflict (PKC) resolution and preventing identity wiping attacks.
- `PacketDao`: Handles storage of mesh packets.
- `ChatMessageDao`: Manages chat message history.
- `PacketDao`: Handles storage of mesh packets, including text messages, waypoints, and reactions.
- **Entities**:
- `NodeEntity`: Represents a node on the mesh.
- `PacketEntity`: Represents a stored packet.
- `Packet`: Represents a stored packet.
- `ReactionEntity`: Represents emoji reactions to packets.
## Security Considerations