rewrite InstanceDao queries to drop unused columns (#2585)
This commit is contained in:
parent
53d84a3eed
commit
1a29a589e1
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,7 @@ import androidx.room.Dao
|
||||||
import androidx.room.Insert
|
import androidx.room.Insert
|
||||||
import androidx.room.OnConflictStrategy
|
import androidx.room.OnConflictStrategy
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
|
import androidx.room.RewriteQueriesToDropUnusedColumns
|
||||||
|
|
||||||
@Dao
|
@Dao
|
||||||
interface InstanceDao {
|
interface InstanceDao {
|
||||||
|
@ -29,9 +30,11 @@ interface InstanceDao {
|
||||||
@Insert(onConflict = OnConflictStrategy.REPLACE, entity = InstanceEntity::class)
|
@Insert(onConflict = OnConflictStrategy.REPLACE, entity = InstanceEntity::class)
|
||||||
suspend fun insertOrReplace(emojis: EmojisEntity)
|
suspend fun insertOrReplace(emojis: EmojisEntity)
|
||||||
|
|
||||||
|
@RewriteQueriesToDropUnusedColumns
|
||||||
@Query("SELECT * FROM InstanceEntity WHERE instance = :instance LIMIT 1")
|
@Query("SELECT * FROM InstanceEntity WHERE instance = :instance LIMIT 1")
|
||||||
suspend fun getInstanceInfo(instance: String): InstanceInfoEntity?
|
suspend fun getInstanceInfo(instance: String): InstanceInfoEntity?
|
||||||
|
|
||||||
|
@RewriteQueriesToDropUnusedColumns
|
||||||
@Query("SELECT * FROM InstanceEntity WHERE instance = :instance LIMIT 1")
|
@Query("SELECT * FROM InstanceEntity WHERE instance = :instance LIMIT 1")
|
||||||
suspend fun getEmojiInfo(instance: String): EmojisEntity?
|
suspend fun getEmojiInfo(instance: String): EmojisEntity?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue