Pixelcat-App-Android/app/src/main/kotlin/at/connyduck/pixelcat/db/AccountDao.kt

19 lines
426 B
Kotlin
Raw Normal View History

2020-06-12 15:44:45 +02:00
package at.connyduck.pixelcat.db
import androidx.room.*
import at.connyduck.pixelcat.db.entitity.AccountEntity
@Dao
interface AccountDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insertOrReplace(account: AccountEntity): Long
@Delete
suspend fun delete(account: AccountEntity)
@Query("SELECT * FROM AccountEntity ORDER BY id ASC")
suspend fun loadAll(): List<AccountEntity>
}