mirror of https://github.com/usbharu/Hideout.git
refactor: 間違っている実装を削除
This commit is contained in:
parent
3a6271a872
commit
f80148815a
|
@ -2,19 +2,6 @@ package dev.usbharu.hideout.application.infrastructure.exposed
|
|||
|
||||
import org.jetbrains.exposed.sql.*
|
||||
|
||||
fun <S> Query.pagination(page: Page, exp: ExpressionWithColumnType<S>): Query {
|
||||
if (page.minId != null) {
|
||||
page.maxId?.let { andWhere { exp.less(it) } }
|
||||
page.minId?.let { andWhere { exp.greater(it) } }
|
||||
} else {
|
||||
page.maxId?.let { andWhere { exp.less(it) } }
|
||||
page.sinceId?.let { andWhere { exp.greater(it) } }
|
||||
this.orderBy(exp, SortOrder.DESC)
|
||||
}
|
||||
page.limit?.let { limit(it) }
|
||||
return this
|
||||
}
|
||||
|
||||
fun <S> Query.withPagination(page: Page, exp: ExpressionWithColumnType<S>): PaginationList<ResultRow, S> {
|
||||
page.limit?.let { limit(it) }
|
||||
val resultRows = if (page.minId != null) {
|
||||
|
|
|
@ -2,7 +2,6 @@ package dev.usbharu.hideout.core.domain.model.relationship
|
|||
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.Page
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.PaginationList
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.pagination
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.withPagination
|
||||
import dev.usbharu.hideout.core.infrastructure.exposedrepository.AbstractRepository
|
||||
import dev.usbharu.hideout.core.infrastructure.exposedrepository.Actors
|
||||
|
|
|
@ -2,13 +2,11 @@ package dev.usbharu.hideout.core.service.timeline
|
|||
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.Page
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.PaginationList
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.pagination
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.withPagination
|
||||
import dev.usbharu.hideout.core.infrastructure.exposedrepository.Timelines
|
||||
import dev.usbharu.hideout.domain.mastodon.model.generated.Status
|
||||
import dev.usbharu.hideout.mastodon.interfaces.api.status.StatusQuery
|
||||
import dev.usbharu.hideout.mastodon.query.StatusQueryService
|
||||
import org.jetbrains.exposed.sql.SortOrder
|
||||
import org.jetbrains.exposed.sql.andWhere
|
||||
import org.jetbrains.exposed.sql.selectAll
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
|
||||
|
|
|
@ -2,7 +2,6 @@ package dev.usbharu.hideout.mastodon.infrastructure.exposedquery
|
|||
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.Page
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.PaginationList
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.pagination
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.withPagination
|
||||
import dev.usbharu.hideout.core.domain.model.emoji.CustomEmoji
|
||||
import dev.usbharu.hideout.core.domain.model.media.toMediaAttachments
|
||||
|
|
|
@ -2,10 +2,8 @@ package dev.usbharu.hideout.mastodon.infrastructure.exposedrepository
|
|||
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.Page
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.PaginationList
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.pagination
|
||||
import dev.usbharu.hideout.application.infrastructure.exposed.withPagination
|
||||
import dev.usbharu.hideout.core.infrastructure.exposedrepository.AbstractRepository
|
||||
import dev.usbharu.hideout.core.infrastructure.exposedrepository.Timelines
|
||||
import dev.usbharu.hideout.mastodon.domain.model.MastodonNotification
|
||||
import dev.usbharu.hideout.mastodon.domain.model.MastodonNotificationRepository
|
||||
import dev.usbharu.hideout.mastodon.domain.model.NotificationType
|
||||
|
|
Loading…
Reference in New Issue