mirror of
https://github.com/gotson/komga.git
synced 2025-12-16 13:33:49 +01:00
perf: remove distinct on BookDtoDao
This commit is contained in:
parent
8e9d93f6f9
commit
3256f3f300
1 changed files with 3 additions and 3 deletions
|
|
@ -112,7 +112,7 @@ class BookDtoDao(
|
|||
val searchCondition = b.ID.inOrNoCondition(bookIds)
|
||||
|
||||
val count = dsl.fetchCount(
|
||||
dsl.selectDistinct(b.ID)
|
||||
dsl.select(b.ID)
|
||||
.from(b)
|
||||
.leftJoin(m).on(b.ID.eq(m.BOOK_ID))
|
||||
.leftJoin(d).on(b.ID.eq(d.BOOK_ID))
|
||||
|
|
@ -240,7 +240,7 @@ class BookDtoDao(
|
|||
)
|
||||
}
|
||||
|
||||
private fun readProgressCondition(userId: String): Condition = r.USER_ID.eq(userId).or(r.USER_ID.isNull)
|
||||
private fun readProgressCondition(userId: String): Condition = r.USER_ID.eq(userId)
|
||||
|
||||
private fun findSiblingSeries(bookId: String, userId: String, next: Boolean): BookDto? {
|
||||
val record = dsl.select(b.SERIES_ID, d.NUMBER_SORT)
|
||||
|
|
@ -286,7 +286,7 @@ class BookDtoDao(
|
|||
}
|
||||
|
||||
private fun selectBase(userId: String, joinConditions: JoinConditions = JoinConditions()) =
|
||||
dsl.selectDistinct(
|
||||
dsl.select(
|
||||
*b.fields(),
|
||||
*m.fields(),
|
||||
*d.fields(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue