Skip to content

Commit

Permalink
Merge pull request #30 from austinarbor/releases/3.43.2.2
Browse files Browse the repository at this point in the history
Prepare 3.43.2.2
  • Loading branch information
austinarbor authored Oct 31, 2023
2 parents eefe9be + 33e04f9 commit 5a3c26a
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .fork-meta/upstream-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.43.2.1
3.43.2.2
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ jobs:
RELEASE_VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`
echo "RELEASE_VERSION=${RELEASE_VERSION}" | tee -a $GITHUB_ENV
sed -i -e "s/^\:project-version\:\ .*/:project-version: ${RELEASE_VERSION}/g" README.adoc
- name: Build
run: mvn --batch-mode --no-transfer-progress package -P release -DskipTests

# The sonatype maven plugin will decide the right destination depending on whether the project is SNAPSHOT or not
- name: Publish to Apache Maven Central
if: github.event_name == 'push' || inputs.push_maven
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image:https://img.shields.io/maven-central/v/dev.aga.sqlite/sqlite-jdbc?color=g&
_Everything below this line comes from the original repository._

= SQLite JDBC Driver
:project-version: 3.43.2.1
:project-version: 3.43.2.2

image:https://img.shields.io/github/actions/workflow/status/xerial/sqlite-jdbc/ci.yml?branch=master[GitHub Workflow Status (branch),link=https://github.com/xerial/sqlite-jdbc/actions/workflows/ci.yml?query=branch%3Amaster]
image:https://badges.gitter.im/xerial/sqlite-jdbc.svg[Join the chat,link=https://gitter.im/xerial/sqlite-jdbc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge]
Expand Down
1 change: 1 addition & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project:
copyright: Taro L. Saito
release:
github:
owner: xerial
discussionCategoryName: Announcements
tagName: '{{projectVersion}}'
changelog:
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>dev.aga.sqlite</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.43.2.1</version>
<version>3.43.2.2</version>
<name>SQLite JDBC</name>
<description>SQLite JDBC library</description>
<url>https://github.com/austinarbor/sqlite-jdbc</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.10.0</junit.version>
<surefire.version>3.1.2</surefire.version>
<graalvm.version>23.1.0</graalvm.version>
<surefire.version>3.2.1</surefire.version>
<graalvm.version>23.1.1</graalvm.version>
<java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory>
</properties>
<licenses>
Expand Down Expand Up @@ -321,7 +321,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.27</version>
<version>0.9.28</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/sqlite/jdbc3/JDBC3ResultSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ public BigDecimal getBigDecimal(int col) throws SQLException {
switch (safeGetColumnType(checkCol(col))) {
case SQLITE_NULL:
return null;
case SQLITE_FLOAT:
return BigDecimal.valueOf(safeGetDoubleCol(col));
case SQLITE_INTEGER:
return BigDecimal.valueOf(safeGetLongCol(col));
case SQLITE_FLOAT:
// avoid double precision
default:
final String stringValue = safeGetColumnText(col);
try {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified src/main/resources/org/sqlite/native/Windows/x86/sqlitejdbc.dll
Binary file not shown.
Binary file not shown.
43 changes: 43 additions & 0 deletions src/test/java/org/sqlite/PrepStmtTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static org.assertj.core.data.Offset.offset;

import java.io.ByteArrayInputStream;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.sql.Date;
Expand Down Expand Up @@ -830,4 +831,46 @@ public void gh914_reuseExecute() throws SQLException {
assertThat(rs2).isNotNull();
}
}

@Test
public void gh1002_pi() throws SQLException {
BigDecimal pi = new BigDecimal("3.14");
stat.executeUpdate("create table gh1002(nr number(10,2))");

try (PreparedStatement ps = conn.prepareStatement("insert into gh1002 values (?)")) {
ps.setBigDecimal(1, pi);
ps.execute();
}

ResultSet rs = stat.executeQuery("select nr from gh1002");
assertThat(rs.getBigDecimal(1)).isEqualTo(pi);
}

@Test
public void gh1002_pi_real() throws SQLException {
BigDecimal pi = new BigDecimal("3.14");
stat.executeUpdate("create table gh1002(nr REAL)");

try (PreparedStatement ps = conn.prepareStatement("insert into gh1002 values (?)")) {
ps.setBigDecimal(1, pi);
ps.execute();
}

ResultSet rs = stat.executeQuery("select nr from gh1002");
assertThat(rs.getBigDecimal(1)).isEqualTo(pi);
}

@Test
public void gh1002_pi_text() throws SQLException {
BigDecimal pi = new BigDecimal("3.14");
stat.executeUpdate("create table gh1002(nr TEXT)");

try (PreparedStatement ps = conn.prepareStatement("insert into gh1002 values (?)")) {
ps.setBigDecimal(1, pi);
ps.execute();
}

ResultSet rs = stat.executeQuery("select nr from gh1002");
assertThat(rs.getBigDecimal(1)).isEqualTo(pi);
}
}

0 comments on commit 5a3c26a

Please sign in to comment.