fixup! ref: reformat caching data in Rooms
This commit is contained in:
@@ -11,6 +11,7 @@ import androidx.room.Embedded
|
|||||||
import androidx.room.Entity
|
import androidx.room.Entity
|
||||||
import androidx.room.Insert
|
import androidx.room.Insert
|
||||||
import androidx.room.Junction
|
import androidx.room.Junction
|
||||||
|
import androidx.room.OnConflictStrategy
|
||||||
import androidx.room.PrimaryKey
|
import androidx.room.PrimaryKey
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import androidx.room.Relation
|
import androidx.room.Relation
|
||||||
@@ -76,7 +77,7 @@ interface RoomDao {
|
|||||||
@Query("SELECT * FROM room WHERE joined = 1 AND id NOT IN (SELECT id FROM SpaceToRoom)")
|
@Query("SELECT * FROM room WHERE joined = 1 AND id NOT IN (SELECT id FROM SpaceToRoom)")
|
||||||
fun getAllJoined(): List<RoomDB>
|
fun getAllJoined(): List<RoomDB>
|
||||||
|
|
||||||
@Insert
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||||
fun insert(vararg rooms: RoomDB)
|
fun insert(vararg rooms: RoomDB)
|
||||||
|
|
||||||
@Delete
|
@Delete
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import androidx.room.Dao
|
|||||||
import androidx.room.Delete
|
import androidx.room.Delete
|
||||||
import androidx.room.Entity
|
import androidx.room.Entity
|
||||||
import androidx.room.Insert
|
import androidx.room.Insert
|
||||||
|
import androidx.room.OnConflictStrategy
|
||||||
import androidx.room.PrimaryKey
|
import androidx.room.PrimaryKey
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import androidx.room.TypeConverters
|
import androidx.room.TypeConverters
|
||||||
@@ -51,7 +52,7 @@ interface UserDao {
|
|||||||
@Query("SELECT * FROM user WHERE id LIKE :id LIMIT 1")
|
@Query("SELECT * FROM user WHERE id LIKE :id LIMIT 1")
|
||||||
fun getById(id: String): UserDB?
|
fun getById(id: String): UserDB?
|
||||||
|
|
||||||
@Insert
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||||
fun insert(vararg users: UserDB)
|
fun insert(vararg users: UserDB)
|
||||||
|
|
||||||
@Delete
|
@Delete
|
||||||
|
|||||||
Reference in New Issue
Block a user