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