Skip to content

Commit 6e1963b

Browse files
xerial-botxerial
andauthored
Update duckdb_jdbc to 0.9.0 (#3229)
## About this PR 📦 Updates org.duckdb:duckdb_jdbc from `0.8.1` to `0.9.0` ## Usage ✅ **Please merge!** I'll automatically update this PR to resolve conflicts as long as you don't change it yourself. If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below. Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/b83aae55d9dd000548c3b3c9b63d79636e7b3c8b/docs/repo-specific-configuration.md) file. _Have a fantastic day writing Scala!_ <details> <summary>🔍 Files still referring to the old version number</summary> The following files still refer to the old version number (0.8.1). You might want to review and update them manually. ``` docs/release-notes.md ``` </details> <details> <summary>⚙ Adjust future updates</summary> Add this to your `.scala-steward.conf` file to ignore future updates of this dependency: ``` updates.ignore = [ { groupId = "org.duckdb", artifactId = "duckdb_jdbc" } ] ``` Or, add this to slow down future updates of this dependency: ``` dependencyOverrides = [{ pullRequests = { frequency = "30 days" }, dependency = { groupId = "org.duckdb", artifactId = "duckdb_jdbc" } }] ``` </details> <sup> labels: library-update </sup> --------- Co-authored-by: Taro L. Saito <[email protected]>
1 parent 2096d36 commit 6e1963b

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed
-1.01 MB
Binary file not shown.

airframe-jdbc/src/test/scala/wvlet/airframe/jdbc/DuckDBTest.scala

+19-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,29 @@
1313
*/
1414
package wvlet.airframe.jdbc
1515

16+
import wvlet.airframe.ulid.ULID
1617
import wvlet.airspec.AirSpec
1718

19+
import java.nio.file.{FileSystems, Files, Paths}
1820
import scala.util.Using
1921

2022
class DuckDBTest extends AirSpec {
23+
24+
private val testDbFile = s"target/duckdb/duckdb-test-${ULID.newULID}.db"
25+
26+
override protected def beforeAll: Unit = {
27+
Using.resource(DbConfig.ofDuckDB(testDbFile).newConnectionPool) { pool =>
28+
pool.executeUpdate("drop table if exists person")
29+
pool.executeUpdate("create table person(id int, name text)")
30+
pool.executeUpdate("insert into person values(1, 'leo')")
31+
pool.executeUpdate("insert into person values(2, 'yui')")
32+
}
33+
}
34+
35+
override protected def afterAll: Unit = {
36+
Files.deleteIfExists(FileSystems.getDefault.getPath(testDbFile))
37+
}
38+
2139
test("duckdb connection") {
2240
Using.resource(DbConfig.ofDuckDB().newConnectionPool) { pool =>
2341
pool.querySingle("select 1") { rs =>
@@ -30,7 +48,7 @@ class DuckDBTest extends AirSpec {
3048

3149
test("read a duckdb file at a path") {
3250
val result = Seq.newBuilder[Person]
33-
Using.resource(DbConfig.ofDuckDB("airframe-jdbc/src/test/resources/duckdb-test.db").newConnectionPool) { pool =>
51+
Using.resource(DbConfig.ofDuckDB(testDbFile).newConnectionPool) { pool =>
3452
pool.query("select * from person order by id") { rs =>
3553
result += Person(rs.getInt(1), rs.getString(2))
3654
}

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ lazy val jdbc =
636636
description := "JDBC connection pool service",
637637
libraryDependencies ++= Seq(
638638
"org.xerial" % "sqlite-jdbc" % SQLITE_JDBC_VERSION,
639-
"org.duckdb" % "duckdb_jdbc" % "0.8.1",
639+
"org.duckdb" % "duckdb_jdbc" % "0.9.0",
640640
"org.postgresql" % "postgresql" % "42.6.0",
641641
"com.zaxxer" % "HikariCP" % "5.0.1",
642642
// For routing slf4j log to airframe-log

0 commit comments

Comments
 (0)