mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-17 07:12:32 -08:00
Remove unused Room database code
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
package com.topjohnwu.magisk.data.database
|
||||
|
||||
import androidx.room.Database
|
||||
import androidx.room.RoomDatabase
|
||||
import com.topjohnwu.magisk.model.entity.Repository
|
||||
|
||||
@Database(
|
||||
version = 1,
|
||||
entities = [Repository::class]
|
||||
)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
|
||||
companion object {
|
||||
const val NAME = "database"
|
||||
}
|
||||
|
||||
abstract fun repoDao(): RepositoryDao
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.topjohnwu.magisk.data.database
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import com.skoumal.teanity.database.BaseDao
|
||||
import com.topjohnwu.magisk.model.entity.Repository
|
||||
|
||||
@Dao
|
||||
interface RepositoryDao : BaseDao<Repository> {
|
||||
|
||||
@Query("DELETE FROM repos")
|
||||
@Transaction
|
||||
override fun deleteAll()
|
||||
|
||||
@Query("SELECT * FROM repos ORDER BY lastUpdate DESC")
|
||||
override fun fetchAll(): List<Repository>
|
||||
|
||||
@Query("SELECT * FROM repos ORDER BY name ASC")
|
||||
fun fetchAllOrderByName(): List<Repository>
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user