diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9509fad5b4..8016bf9f0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: # strategy: # matrix: # os: [ ubuntu-latest, windows-latest, macos-latest ] -# java: [ '17', '21' ] +# java: [ '17', '21', '22' ] # profiles: ['native', 'native,native-exported'] # runs-on: ${{ matrix.os }} # steps: diff --git a/README.adoc b/README.adoc index ecfe43834a..40438f2941 100644 --- a/README.adoc +++ b/README.adoc @@ -1,5 +1,5 @@ = SQLite JDBC Driver -:project-version: 3.46.0.1 +:project-version: 3.47.0.0 image:https://img.shields.io/github/actions/workflow/status/willena/sqlite-jdbc-crypt/ci.yml?branch=master[GitHub Workflow Status (branch),link=https://github.com/willena/sqlite-jdbc/actions/workflows/ci.yml?query=branch%3Amaster] image:https://maven-badges.herokuapp.com/maven-central/io.github.willena/sqlite-jdbc/badge.svg[Maven Central,link=https://maven-badges.herokuapp.com/maven-central/io.github.willena/sqlite-jdbc/] @@ -29,19 +29,18 @@ SQLite JDBC is a library for accessing SQLite databases through the JDBC API. Fo . <> `sqlite-jdbc-{project-version}.jar` then append this jar file into your classpath. -. https://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar[Download] `slf4j-api-1.7.36.jar` then append this jar file into your classpath. . Open a SQLite database connection from your code. (see the example below) === Example usage -Assuming `sqlite-jdbc-{project-version}.jar` and `slf4j-api-1.7.36.jar` are placed in the current directory. +Assuming `sqlite-jdbc-{project-version}.jar` is placed in the current directory. [source,shell,subs="attributes+"] ---- > javac Sample.java -> java -classpath ".;sqlite-jdbc-{project-version}.jar;slf4j-api-1.7.36.jar" Sample # in Windows +> java -classpath ".;sqlite-jdbc-{project-version}.jar" Sample # in Windows or -> java -classpath ".:sqlite-jdbc-{project-version}.jar:slf4j-api-1.7.36.jar" Sample # in macOS or Linux +> java -classpath ".:sqlite-jdbc-{project-version}.jar" Sample # in macOS or Linux name = leo id = 1 name = yui @@ -116,7 +115,7 @@ the following operating systems: |macOS | |✔ | | | |✔ | | |Linux (libc) |✔ |✔ |✔ |✔ |✔ |✔ |✔ |✔ |Linux (musl) |✔ |✔ | | | |✔ | | -|Android |✔ |✔ |✔ | | |✔ | | +|Android (API Level 24+) |✔ |✔ |✔ | | |✔ | | |FreeBSD |✔ |✔ | | | |✔ | | |=== diff --git a/USAGE.md b/USAGE.md index e095a57b0e..a738462fa7 100644 --- a/USAGE.md +++ b/USAGE.md @@ -233,6 +233,22 @@ Here is what you need to know. 4. Change the key to `null` using`PRAGMA rekey=''` 5. Use normally +## Generated keys + +SQLite has limited support to retrieve generated keys, using [last_insert_rowid](https://www.sqlite.org/c3ref/last_insert_rowid.html), with the following limitations: +- a single ID can be retrieved, even if multiple rows were added or updated +- it needs to be called right after the statement + +By default the driver will eagerly retrieve the generated keys after each statement, which may impact performances. + +You can disable the retrieval of generated keys in 3 ways: +- via `SQLiteDataSource#setGetGeneratedKeys(false)` +- via `SQLiteConnectionConfig#setGetGeneratedKeys(false)`: +- using the pragma `jdbc.get_generated_keys`: +```java +try (Connection connection = DriverManager.getConnection("jdbc:sqlite::memory:?jdbc.get_generated_keys=false")) { /*...*/ } +``` + ## Explicit read only transactions (use with Hibernate) In order for the driver to be compliant with Hibernate, it needs to allow setting the read only flag after a connection has been created. diff --git a/VERSION b/VERSION index d953991651..400f47059e 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ -version=3.46.1 -artifactVersion=3.46.1.1-SNAPSHOT -sqliteMCVersion=1.8.7 +version=3.47.0 +artifactVersion=3.47.0.0-SNAPSHOT +sqliteMCVersion=1.9.0 diff --git a/pom.xml b/pom.xml index 13e17fdd50..2a28f50217 100644 --- a/pom.xml +++ b/pom.xml @@ -4,17 +4,17 @@ 4.0.0 io.github.willena sqlite-jdbc - 3.46.1.1-SNAPSHOT + 3.47.0.0-SNAPSHOT SQLite JDBC SQLite JDBC library with encryption and authentication support https://github.com/Willena/sqlite-jdbc-crypt UTF-8 - 5.10.3 - 3.3.1 + 5.11.3 + 3.5.2 1.3.0 - 24.0.2 + 24.1.1 ${project.basedir}/src/main/java9 @@ -93,7 +93,7 @@ org.apache.maven.plugins maven-help-plugin - 3.4.1 + 3.5.1 @@ -280,7 +280,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.5 + 3.2.7 @@ -301,7 +301,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.11.1 src/main/java -Xdoclint:none @@ -340,7 +340,7 @@ org.graalvm.buildtools native-maven-plugin - 0.10.2 + 0.10.3 true @@ -354,6 +354,10 @@ false true + + + --initialize-at-build-time=org.junitpioneer.jupiter.issue.IssueExtensionExecutionListener + @@ -413,6 +417,7 @@ org.slf4j slf4j-api 1.7.36 + true