mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
rename Packet to MeshLog
This commit is contained in:
parent
c2d681b11e
commit
a93d4e1dcd
14 changed files with 294 additions and 294 deletions
|
|
@ -0,0 +1,24 @@
|
|||
package com.geeksville.mesh.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.Query
|
||||
import com.geeksville.mesh.database.entity.MeshLog
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@Dao
|
||||
interface MeshLogDao {
|
||||
|
||||
@Query("Select * from log order by received_date desc limit 0,:maxItem")
|
||||
fun getAllLogs(maxItem: Int): Flow<List<MeshLog>>
|
||||
|
||||
@Query("Select * from log order by received_date asc limit 0,:maxItem")
|
||||
fun getAllLogsInReceiveOrder(maxItem: Int): Flow<List<MeshLog>>
|
||||
|
||||
@Insert
|
||||
fun insert(log: MeshLog)
|
||||
|
||||
@Query("DELETE from log")
|
||||
fun deleteAll()
|
||||
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
package com.geeksville.mesh.database.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.Query
|
||||
import com.geeksville.mesh.database.entity.Packet
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@Dao
|
||||
interface PacketDao {
|
||||
|
||||
@Query("Select * from packet order by received_date desc limit 0,:maxItem")
|
||||
fun getAllPacket(maxItem: Int): Flow<List<Packet>>
|
||||
|
||||
@Query("Select * from packet order by received_date asc limit 0,:maxItem")
|
||||
fun getAllPacketsInReceiveOrder(maxItem: Int): Flow<List<Packet>>
|
||||
|
||||
@Insert
|
||||
fun insert(packet: Packet)
|
||||
|
||||
@Query("DELETE from packet")
|
||||
fun deleteAll()
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue