pull/32/head
kunfei 5 years ago
parent 510aa5b2cc
commit 246009e1a8
  1. 2
      app/src/main/java/io/legado/app/data/dao/SourceCookieDao.kt
  2. 4
      app/src/main/java/io/legado/app/data/entities/BookChapter.kt
  3. 2
      app/src/main/java/io/legado/app/data/entities/SourceCookie.kt

@ -6,7 +6,7 @@ import androidx.room.Query
@Dao @Dao
interface SourceCookieDao { interface SourceCookieDao {
@Query("SELECT cookie FROM cookies Where exploreUrl = :exploreUrl") @Query("SELECT cookie FROM cookies Where url = :url")
fun getCookieByUrl(url: String): String? fun getCookieByUrl(url: String): String?
} }

@ -10,8 +10,8 @@ import kotlinx.android.parcel.Parcelize
@Parcelize @Parcelize
@Entity( @Entity(
tableName = "chapters", tableName = "chapters",
primaryKeys = ["exploreUrl", "bookUrl"], primaryKeys = ["url", "bookUrl"],
indices = [(Index(value = ["exploreUrl"], unique = true)), (Index(value = ["bookUrl", "index"], unique = true))], indices = [(Index(value = ["bookUrl"], unique = true)), (Index(value = ["bookUrl", "index"], unique = true))],
foreignKeys = [(ForeignKey( foreignKeys = [(ForeignKey(
entity = Book::class, entity = Book::class,
parentColumns = ["descUrl"], parentColumns = ["descUrl"],

@ -4,7 +4,7 @@ import androidx.room.Entity
import androidx.room.Index import androidx.room.Index
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
@Entity(tableName = "cookies", indices = [(Index(value = ["exploreUrl"], unique = true))]) @Entity(tableName = "cookies", indices = [(Index(value = ["url"], unique = true))])
data class SourceCookie( data class SourceCookie(
@PrimaryKey @PrimaryKey
var url: String = "", var url: String = "",

Loading…
Cancel
Save