aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-03-06 23:35:04 -0500
committerAllan Wang <me@allanwang.ca>2019-03-06 23:35:04 -0500
commitb417cc51b28d558195c4cc075d0e6ce8192bf270 (patch)
tree97c82944f99b6bcc9c3e6ab4835c5afc18327b19 /app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
parent8b70d80070209eb19791eecf207a8fdefea17a4e (diff)
downloadfrost-b417cc51b28d558195c4cc075d0e6ce8192bf270.tar.gz
frost-b417cc51b28d558195c4cc075d0e6ce8192bf270.tar.bz2
frost-b417cc51b28d558195c4cc075d0e6ce8192bf270.zip
Update notif database
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
index 34a88011..d5347f18 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
@@ -17,6 +17,7 @@
package com.pitchedapps.frost.db
import android.os.Parcelable
+import androidx.room.ColumnInfo
import androidx.room.Dao
import androidx.room.Entity
import androidx.room.Insert
@@ -38,6 +39,7 @@ import kotlinx.android.parcel.Parcelize
@Parcelize
data class CookieEntity(
@androidx.room.PrimaryKey
+ @ColumnInfo(name = "cookie_id")
val id: Long,
val name: String?,
val cookie: String?
@@ -53,7 +55,7 @@ interface CookieDao {
@Query("SELECT * FROM cookies")
suspend fun selectAll(): List<CookieEntity>
- @Query("SELECT * FROM cookies WHERE id = :id")
+ @Query("SELECT * FROM cookies WHERE cookie_id = :id")
suspend fun selectById(id: Long): CookieEntity?
@Insert(onConflict = OnConflictStrategy.REPLACE)
@@ -62,7 +64,7 @@ interface CookieDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insertCookies(cookies: List<CookieEntity>)
- @Query("DELETE FROM cookies WHERE id = :id")
+ @Query("DELETE FROM cookies WHERE cookie_id = :id")
suspend fun deleteById(id: Long)
}