Category Mutations (#566)

* Complete Category mutations

* Remove TODO
This commit is contained in:
Mitchell Syer
2023-06-05 09:18:57 -04:00
committed by GitHub
parent 51bfdc0947
commit 300c0a8f35
5 changed files with 340 additions and 14 deletions

View File

@@ -84,7 +84,7 @@ object Category {
}
/** make sure category order numbers starts from 1 and is consecutive */
private fun normalizeCategories() {
fun normalizeCategories() {
transaction {
CategoryTable.selectAll()
.orderBy(CategoryTable.order to SortOrder.ASC)

View File

@@ -9,6 +9,6 @@ package suwayomi.tachidesk.manga.impl.util.lang
import org.jetbrains.exposed.sql.Query
fun Query.isEmpty() = this.count() == 0L
fun Query.isEmpty() = this.empty()
fun Query.isNotEmpty() = !this.isEmpty()