Skip to content

Commit ee5c5b5

Browse files
committed
Room refactor
1 parent 8629378 commit ee5c5b5

File tree

1 file changed

+2
-0
lines changed
  • core/persistence-kmp/src/androidMain/kotlin/org/michaelbel/movies/persistence/database/dao

1 file changed

+2
-0
lines changed

core/persistence-kmp/src/androidMain/kotlin/org/michaelbel/movies/persistence/database/dao/MovieDao.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.room.Dao
55
import androidx.room.Insert
66
import androidx.room.OnConflictStrategy
77
import androidx.room.Query
8+
import androidx.room.RewriteQueriesToDropUnusedColumns
89
import androidx.room.Transaction
910
import kotlinx.coroutines.flow.Flow
1011
import org.michaelbel.movies.persistence.database.entity.MovieDb
@@ -27,6 +28,7 @@ internal interface MovieDao {
2728
@Query("SELECT * FROM movies WHERE movieList = :movieList ORDER BY position ASC LIMIT :limit")
2829
suspend fun movies(movieList: String, limit: Int): List<MoviePojo>
2930

31+
@RewriteQueriesToDropUnusedColumns
3032
@Query("SELECT * FROM movies WHERE movieList = :movieList ORDER BY position ASC LIMIT :limit")
3133
suspend fun moviesMini(movieList: String, limit: Int): List<MovieDbMini>
3234

0 commit comments

Comments
 (0)