mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
perf(messaging): batch node + reply lookups in message loading (#5149)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
dea364dd17
commit
878905aea3
2 changed files with 49 additions and 18 deletions
|
|
@ -309,6 +309,16 @@ interface PacketDao {
|
|||
)
|
||||
suspend fun getPacketByPacketId(packetId: Int): PacketEntity?
|
||||
|
||||
@Transaction
|
||||
@Query(
|
||||
"""
|
||||
SELECT * FROM packet
|
||||
WHERE packet_id IN (:packetIds)
|
||||
AND (myNodeNum = 0 OR myNodeNum = (SELECT myNodeNum FROM my_node))
|
||||
""",
|
||||
)
|
||||
suspend fun getPacketsByPacketIds(packetIds: List<Int>): List<PacketEntity>
|
||||
|
||||
@Query(
|
||||
"""
|
||||
SELECT * FROM packet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue