|
|
|
@ -52,6 +52,14 @@ interface ChapterQueries : DbProvider {
|
|
|
|
|
.build())
|
|
|
|
|
.prepare()
|
|
|
|
|
|
|
|
|
|
fun getChapter(url: String, mangaId: Long) = db.get()
|
|
|
|
|
.`object`(Chapter::class.java)
|
|
|
|
|
.withQuery(Query.builder()
|
|
|
|
|
.table(ChapterTable.TABLE)
|
|
|
|
|
.where("${ChapterTable.COL_URL} = ? AND ${ChapterTable.COL_MANGA_ID} = ?")
|
|
|
|
|
.whereArgs(url, mangaId)
|
|
|
|
|
.build())
|
|
|
|
|
.prepare()
|
|
|
|
|
|
|
|
|
|
fun insertChapter(chapter: Chapter) = db.put().`object`(chapter).prepare()
|
|
|
|
|
|
|
|
|
|