Skip to content

Commit 7e49641

Browse files
committed
Update version to 1.4.2
1 parent bcd2f98 commit 7e49641

File tree

8 files changed

+41
-28
lines changed

8 files changed

+41
-28
lines changed

CHANGELOG.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
# SQLlin Change Log
22

33
- Date format: YYYY-MM-dd
4-
-
5-
## v1.4.2 / 2025-xx-xx
4+
5+
## v1.4.2 / 2025-04-23
6+
7+
### All
8+
9+
* Update `Kotlin`'s version to `2.1.20`
10+
11+
### sqllin-dsl
12+
13+
* Update `kotlinx.coroutines`'s version to `1.10.2`
14+
* Update `kotlinx.serialization`'s version to `1.8.1`
615

716
### sqllin-driver
817

9-
* Update the `sqlite-jdbc`'s version to `3.49.0.0`
18+
* Update the `sqlite-jdbc`'s version to `3.49.1.0`
19+
20+
### sqllin-processor
21+
22+
* Update `KSP`'s version to `2.1.20-1.0.32`
1023

1124
## v1.4.1 / 2025-02-04
1225

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=1.4.1
1+
VERSION=1.4.2
22
GROUP=com.ctrip.kotlin
33

44
#Maven Publish Information

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[versions]
22

3-
kotlin = "2.1.10"
4-
agp = "8.7.3"
5-
ksp = "2.1.10-1.0.29"
6-
serialization = "1.8.0"
7-
coroutines = "1.10.1"
3+
kotlin = "2.1.20"
4+
agp = "8.9.2"
5+
ksp = "2.1.20-1.0.32"
6+
serialization = "1.8.1"
7+
coroutines = "1.10.2"
88
androidx-annotation = "1.9.1"
99
androidx-test = "1.6.1"
1010
androidx-test-runner = "1.6.2"
11-
sqlite-jdbc = "3.49.0.0"
11+
sqlite-jdbc = "3.49.1.0"
1212

1313
[libraries]
1414

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Mar 08 15:11:46 CST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

sqllin-dsl/doc/concurrency-safety-cn.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# 并发安全
22

33
`1.2.2` 版本之前, _sqllin-dsl_ 无法保证并发安全。如果你想在不同的线程中共享同一个 `Database`
4-
对象,这可能会导致不可预测的结果。所以最佳的方式是:当你想要操作你的数据库时,创建一个 `Database`
5-
对象,当你结束的你的操作时,立即关闭它
4+
实例,这可能会导致不可预测的结果。所以最佳的方式是:当你想要操作数据库时,创建一个 `Database`
5+
实例,而当你结束操作时立即关闭它
66

7-
但是这非常不方便,我们总是必须频繁地创建数据库连接并关闭它,这是一种对资源的浪费。举例来说,
7+
但是这非常不方便,我们总是必须频繁地创建数据库连接并关闭,是一种对资源的浪费。举例来说,
88
如果我们正在开发一款 Android app,并且在单个页面中(Activity/Fragment),我们希望我们可以持有一个
9-
`Database` 对象,当我们想要在后台线程(或协程)中操作数据库时,直接使用它,并在某些生命周期函数内关闭它
9+
`Database` 实例,当我们想要在后台线程(或协程)中操作数据库时直接使用它,并在某些生命周期函数内将它关闭
1010
`onDestroy``onStop` 等等)。
1111

12-
这种情况下,当我们在不同线程(或协程)中共享 `Database` 对象时,我们应该确保并发安全。所以,从 `1.2.2`
12+
这种情况下,当我们在不同线程(或协程)中共享 `Database` 实例时,我们应该确保并发安全。所以,从 `1.2.2`
1313
版本开始,我们可以使用新 API `Database#suspendedScope` 来代替旧的 `database {}` 用法。比如说,如果我们有如下旧代码:
1414

1515
```kotlin
@@ -26,7 +26,7 @@ fun sample() {
2626
}
2727
}
2828
```
29-
我们使用新 API `Database#suspendedScope` 来代替旧的 `database {}` 后,将会是这样:
29+
我们使用新 API `Database#suspendedScope` 来代替旧 `database {}` 后,将会是这样:
3030

3131
```kotlin
3232
fun sample() {
@@ -42,8 +42,8 @@ fun sample() {
4242
}
4343
}
4444
```
45-
`suspendedScope` 是一个挂起函数。在 `suspendedScope` 内部,所有的操作都是原子性的。这意味着:如果你共享了同一个
46-
`Database` 对象到不同的协程中,它可以保证后执行的 `suspendedScope` 会等待先执行的 `suspendedScope` 执行完成。
45+
`suspendedScope` 是一个挂起函数。在 `suspendedScope` 内部所有的操作都是原子性的。这意味着:如果你共享了同一个
46+
`Database` 实例到不同的协程中,它可以保证后执行的 `suspendedScope` 会等待先执行的 `suspendedScope` 执行完成。
4747

4848
## 接下来
4949

sqllin-dsl/doc/concurrency-safety.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Concurrency Safety
22

33
Before the version `1.2.2`, _sqllin-dsl_ can't ensure the concurrency safety. If
4-
you want to share a `Database` object between different threads, that would lead to
4+
you want to share a `Database` instance between different threads, that would lead to
55
unpredictable consequences. So, the best way is when you want to operate your
6-
database, create a `Database` object, and when you finish your operating, close it immediately.
6+
database, create a `Database` instance, and when you finish your operating, close it immediately.
77

88
But, that's very inconvenient, we always have to create a database connection and
99
close it frequently, this is a waste of resources. For example, if we are developing
1010
an Android app, and in a single page (Activity/Fragment), we hope we can keep a
11-
`Database` object, when we want to operate the database in background threads (or
11+
`Database` instance, when we want to operate the database in background threads (or
1212
coroutines), just use it, and, close it in certain lifecycle
1313
functions (`onDestroy`, `onStop`, etc.).
1414

1515
At that time, we should make sure the concurrency safety that we share the `Database`
16-
object between different threads (or coroutines). So, start with the version `1.2.2`, we can
16+
instance between different threads (or coroutines). So, start with the version `1.2.2`, we can
1717
use the new API `Database#suspendedScope` to replace the usage of `database {}`. For
1818
example, if we have some old code:
1919

@@ -49,7 +49,7 @@ fun sample() {
4949
```
5050

5151
The `suspendedScope` is a suspend function. Inside the `suspendedScope`, the all operations are
52-
atomic. That means: If you share the same `Database` object between two coroutines, it can ensure the
52+
atomic. That means: If you share the same `Database` instance between two coroutines, it can ensure the
5353
`suspendedScope` executing later will wait for the one executing earlier to finish.
5454

5555
## Next Step

sqllin-dsl/doc/getting-start-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414
id("com.google.devtools.ksp")
1515
}
1616

17-
val sqllinVersion = "1.4.1"
17+
val sqllinVersion = "1.4.2"
1818

1919
kotlin {
2020
// ......

sqllin-dsl/doc/getting-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ plugins {
1616
id("com.google.devtools.ksp")
1717
}
1818

19-
val sqllinVersion = "1.4.1"
19+
val sqllinVersion = "1.4.2"
2020

2121
kotlin {
2222
// ......
@@ -30,10 +30,10 @@ kotlin {
3030
implementation("com.ctrip.kotlin:sqllin-driver:$sqllinVersion")
3131

3232
// The sqllin-dsl serialization and deserialization depends on kotlinx-serialization
33-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.8.0")
33+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.8.1")
3434

3535
// Since 1.2.2, sqllin-dsl depends on kotlinx.coroutines
36-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
36+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
3737
}
3838
}
3939
// ......

0 commit comments

Comments
 (0)