mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-05 05:34:23 +00:00
fix: old sessions (#218)
* fix: old sessions * fix: old sessions --------- Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
parent
1b207d614b
commit
222b901833
1 changed files with 4 additions and 2 deletions
|
|
@ -4,6 +4,8 @@ import androidx.room.Dao
|
|||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import androidx.room.Update
|
||||
import androidx.room.Upsert
|
||||
import io.github.openflocon.data.local.device.datasource.model.DeviceAppEntity
|
||||
import io.github.openflocon.data.local.device.datasource.model.DeviceEntity
|
||||
import io.github.openflocon.domain.device.models.DeviceId
|
||||
|
|
@ -21,10 +23,10 @@ interface DevicesDao {
|
|||
@Query("SELECT * FROM DeviceEntity WHERE deviceId = :deviceId")
|
||||
suspend fun getDeviceById(deviceId: String): DeviceEntity?
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
@Upsert
|
||||
suspend fun insertDevice(device: DeviceEntity)
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
@Upsert
|
||||
suspend fun insertDeviceApp(app: DeviceAppEntity)
|
||||
|
||||
@Query("DELETE FROM DeviceEntity")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue