mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-08 09:47:09 +00:00
update dependnecies
This commit is contained in:
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
## 0.24.6
|
## 0.24.6
|
||||||
|
|
||||||
|
* `Versions`:
|
||||||
|
* `KSLog`: `1.4.0` -> `1.4.1`
|
||||||
|
* `Exposed`: `0.58.0` -> `0.59.0`
|
||||||
|
* `SQLite`: `3.48.0.0` -> `3.49.0.0`
|
||||||
|
* `AndroidFragment`: `1.8.5` -> `1.8.6`
|
||||||
* `KSP`:
|
* `KSP`:
|
||||||
* `Variations`:
|
* `Variations`:
|
||||||
* Module has been created
|
* Module has been created
|
||||||
|
@@ -4,18 +4,18 @@ kt = "2.1.10"
|
|||||||
kt-serialization = "1.8.0"
|
kt-serialization = "1.8.0"
|
||||||
kt-coroutines = "1.10.1"
|
kt-coroutines = "1.10.1"
|
||||||
|
|
||||||
kslog = "1.4.0"
|
kslog = "1.4.1"
|
||||||
|
|
||||||
jb-compose = "1.7.3"
|
jb-compose = "1.7.3"
|
||||||
jb-exposed = "0.58.0"
|
jb-exposed = "0.59.0"
|
||||||
jb-dokka = "2.0.0"
|
jb-dokka = "2.0.0"
|
||||||
|
|
||||||
sqlite = "3.48.0.0"
|
sqlite = "3.49.0.0"
|
||||||
|
|
||||||
korlibs = "5.4.0"
|
korlibs = "5.4.0"
|
||||||
uuid = "0.8.4"
|
uuid = "0.8.4"
|
||||||
|
|
||||||
ktor = "3.0.3"
|
ktor = "3.1.0"
|
||||||
|
|
||||||
gh-release = "2.5.2"
|
gh-release = "2.5.2"
|
||||||
|
|
||||||
@@ -28,16 +28,15 @@ kotlin-poet = "1.18.1"
|
|||||||
|
|
||||||
versions = "0.51.0"
|
versions = "0.51.0"
|
||||||
|
|
||||||
android-gradle = "8.2.2"
|
android-gradle = "8.7.+"
|
||||||
dexcount = "4.0.0"
|
dexcount = "4.0.0"
|
||||||
|
|
||||||
android-coreKtx = "1.15.0"
|
android-coreKtx = "1.15.0"
|
||||||
android-recyclerView = "1.4.0"
|
android-recyclerView = "1.4.0"
|
||||||
android-appCompat = "1.7.0"
|
android-appCompat = "1.7.0"
|
||||||
android-fragment = "1.8.5"
|
android-fragment = "1.8.6"
|
||||||
android-espresso = "3.6.1"
|
android-espresso = "3.6.1"
|
||||||
android-test = "1.2.1"
|
android-test = "1.2.1"
|
||||||
android-compose-material3 = "1.3.0"
|
|
||||||
|
|
||||||
android-props-minSdk = "21"
|
android-props-minSdk = "21"
|
||||||
android-props-compileSdk = "35"
|
android-props-compileSdk = "35"
|
||||||
|
@@ -2,19 +2,19 @@ package dev.inmo.micro_utils.pagination
|
|||||||
|
|
||||||
import org.jetbrains.exposed.sql.*
|
import org.jetbrains.exposed.sql.*
|
||||||
|
|
||||||
fun Query.paginate(with: Pagination, orderBy: Pair<Expression<*>, SortOrder>? = null) = limit(
|
fun Query.paginate(with: Pagination, orderBy: Pair<Expression<*>, SortOrder>? = null) =
|
||||||
with.size,
|
limit(with.size)
|
||||||
with.firstIndex.toLong()
|
.offset(with.firstIndex.toLong())
|
||||||
).let {
|
.let {
|
||||||
if (orderBy != null) {
|
if (orderBy != null) {
|
||||||
it.orderBy(
|
it.orderBy(
|
||||||
orderBy.first,
|
orderBy.first,
|
||||||
orderBy.second
|
orderBy.second
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
it
|
it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun Query.paginate(with: Pagination, orderBy: Expression<*>?, reversed: Boolean = false) = paginate(
|
fun Query.paginate(with: Pagination, orderBy: Expression<*>?, reversed: Boolean = false) = paginate(
|
||||||
with,
|
with,
|
||||||
|
@@ -137,7 +137,7 @@ abstract class AbstractExposedWriteCRUDRepo<ObjectType, IdType, InputValueType>(
|
|||||||
override suspend fun deleteById(ids: List<IdType>) {
|
override suspend fun deleteById(ids: List<IdType>) {
|
||||||
onBeforeDelete(ids)
|
onBeforeDelete(ids)
|
||||||
transaction(db = database) {
|
transaction(db = database) {
|
||||||
val deleted = deleteWhere(null, null) { selectByIds(it, ids) }
|
val deleted = deleteWhere { selectByIds(it, ids) }
|
||||||
if (deleted == ids.size) {
|
if (deleted == ids.size) {
|
||||||
ids
|
ids
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user