Skip to content

Update sqlite-jdbc's version to 3.49.0.0 #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# SQLlin Change Log

- Date format: YYYY-MM-dd
-
## v1.4.2 / 2025-xx-xx

### sqllin-driver

* Update the `sqlite-jdbc`'s version to `3.49.0.0`

## v1.4.1 / 2025-02-04

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ coroutines = "1.10.1"
androidx-annotation = "1.9.1"
androidx-test = "1.6.1"
androidx-test-runner = "1.6.2"
sqlite-jdbc = "3.48.0.0"
sqlite-jdbc = "3.49.0.0"

[libraries]

Expand Down
2 changes: 1 addition & 1 deletion sqllin-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _sqllin-driver_ use the _New Native Driver_.
Whatever, [SQLiter](https://github.com/touchlab/SQLiter) still is a good project. I referred to a lot of designs and code
details from it and use them in _New Native Driver_ in _sqllin-driver_ .

Since `1.2.0`, SQLlin started to support JVM target, and it's base on [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc).
Since `1.2.0`, SQLlin started to support JVM target, and it's based on [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc).

## Basic usage

Expand Down
2 changes: 1 addition & 1 deletion sqllin-driver/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
source set 可用的通用 API,并且它们在不同的平台有不同的实现。

在 Android 上,并没有太多的方法可供我们选择。如果我们使用 Android Framework SQLite Java
API,事情将会变得非常简单,但是缺点是很多 SQLite 参数不能再 Android P 以下版本的系统上生效。如果我们自己编写
API,事情将会变得非常简单,但是缺点是很多 SQLite 参数不能在 Android P 以下版本的系统上生效。如果我们自己编写
JNI 代码去调用 SQLite C 函数,看起来可以解决这个问题,但是会遇到一个更大的问题:在版本高于 Android N
的系统上,Google 不允许开发者在 NDK 中调用系统内置的 SQLite C 函数。如果我们坚定地选择这条路,我们必须自己将
SQLite 源码编译到 _sqllin-driver_ ,这将让我们的工程变得更复杂。最后我们还是选择了基于 Android Framework Java API。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public fun Context.toDatabasePath(): DatabasePath = AndroidDatabasePath(this)
internal value class AndroidDatabasePath(val context: Context) : DatabasePath

public actual fun openDatabase(config: DatabaseConfiguration): DatabaseConnection {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && config.inMemory)
return AndroidDatabaseConnection(createInMemory(config.toAndroidOpenParams()))
val isEqualsOrHigherThanAndroidP = Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
if (isEqualsOrHigherThanAndroidP && config.inMemory)
return AndroidDatabaseConnection(createInMemory(config.toAndroidOpenParams()))
val helper = if (isEqualsOrHigherThanAndroidP)
AndroidDBHelper(config)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.ctrip.sqllin.driver

import java.lang.IllegalStateException
import java.sql.Connection

import java.sql.PreparedStatement
Expand Down
4 changes: 1 addition & 3 deletions sqllin-driver/src/nativeInterop/cinterop/sqlite3.def
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package = com.ctrip.sqllin.sqlite3
headers = sqlite3.h
headerFilter = sqlite3*.h

linkerOpts.linux_x64 = -lpthread -ldl
linkerOpts.macos_x64 = -lpthread -ldl
linkerOpts.macos_arm64 = -lpthread -ldl
linkerOpts.linux = -lpthread -ldl

noStringConversion = sqlite3_prepare_v2 sqlite3_prepare_v3

Expand Down
Loading