library improvements: search
This commit is contained in:
1 parent
ade4fb1896
commit
1239f15836
10 files changed
+618
-28
No files matched your search
@@ -30,6 +30,7 @@ data class BookRecord(
|
||||
val language: String? = null,
|
||||
val date: String? = null,
|
||||
val description: String? = null,
|
||||
val keywords: String? = null,
|
||||
val coverImage: ByteArray? = null,
|
||||
val coverImageMimeType: String? = null,
|
||||
val createdAt: Long,
|
||||
@@ -46,6 +47,7 @@ data class BookRecord(
|
||||
language == other.language &&
|
||||
date == other.date &&
|
||||
description == other.description &&
|
||||
keywords == other.keywords &&
|
||||
coverImage.contentEquals(other.coverImage) &&
|
||||
coverImageMimeType == other.coverImageMimeType &&
|
||||
createdAt == other.createdAt &&
|
||||
@@ -60,6 +62,7 @@ data class BookRecord(
|
||||
result = 31 * result + (language?.hashCode() ?: 0)
|
||||
result = 31 * result + (date?.hashCode() ?: 0)
|
||||
result = 31 * result + (description?.hashCode() ?: 0)
|
||||
result = 31 * result + (keywords?.hashCode() ?: 0)
|
||||
result = 31 * result + (coverImage?.contentHashCode() ?: 0)
|
||||
result = 31 * result + (coverImageMimeType?.hashCode() ?: 0)
|
||||
result = 31 * result + createdAt.hashCode()
|
||||
@@ -109,6 +112,7 @@ data class BookFileRecord(
|
||||
val lastReadAt: Long? = null,
|
||||
val createdAt: Long,
|
||||
val updatedAt: Long,
|
||||
val importedAt: Long = createdAt,
|
||||
)
|
||||
|
||||
data class LibraryFileRecord(
|
||||
@@ -125,6 +129,7 @@ data class LibraryFileRecord(
|
||||
val lastSeenAt: Long? = null,
|
||||
val readingStatus: BookReadingStatus = BookReadingStatus.NEW,
|
||||
val lastReadAt: Long? = null,
|
||||
val importedAt: Long,
|
||||
)
|
||||
|
||||
data class ContentAnchor(
|
||||
@@ -200,6 +205,7 @@ interface BookFileRepository {
|
||||
fun findPrimaryDuplicateTarget(bodyClusterId: String?, bodyId: String?, rawSha256: String): BookFileRecord?
|
||||
fun markDuplicateFiles(): Int
|
||||
fun listLibraryFiles(limit: Int = 100, offset: Int = 0): List<LibraryFileRecord>
|
||||
fun searchLibraryFiles(prefixes: List<String>, limit: Int = 100): List<LibraryFileRecord>
|
||||
fun list(limit: Int = 500, offset: Int = 0): List<BookFileRecord>
|
||||
fun listForBook(bookId: String): List<BookFileRecord>
|
||||
fun updateReadingStatus(id: String, status: BookReadingStatus): Boolean
|
||||
|
||||
Reference in new issue
Block a user