Skip to content

Commit

Permalink
update dependnecies
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar committed Feb 13, 2025
1 parent b81af7e commit 9a20e81
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9a20e81

Please sign in to comment.