Commit 630b42f
Improve connection API and test infrastructure (#181)
* Add ConnectionSource interface and unify pooled/non-pooled data sources
- Add ConnectionSource interface unifying pooled and non-pooled connection sources
- Add SimpleDataSource for non-pooled connections (wraps DriverManager)
- Add ConnectionSettings for connection behavior (isolation, autoCommit, readOnly, etc.)
- Move connection settings from PoolConfig to ConnectionSettings
- Add transactor() shortcuts to DatabaseConfig for common use cases
- Update PooledDataSource to implement ConnectionSource
- Remove config::connect from Transactor (use ConnectionSource instead)
This provides a clean, unified API:
- config.transactor() for quick non-pooled access
- config.transactor(settings, strategy) for customized non-pooled
- HikariDataSourceFactory.create(config, settings, pool).transactor() for pooled
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Bump PostgreSQL version from 14 to 16 in deploy-docs workflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add test-utils with file locking for parallel snapshot tests
When tests run in parallel across multiple JVMs, git operations can conflict.
This adds proper file-based locking to ensure exclusive access to git add.
- Add test-utils project with SnapshotTestUtils (Java)
- withGitLock() uses FileChannel.lock() for cross-JVM file locking
- Update all SnapshotTest files to use shared utility
- Update WithConnection files to use new Transactor API
- Add .snapshot-test.lock to .gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update tester withConnection files to use new Transactor API
Migrate from `new Transactor(config, strategy)` to
`config.transactor(strategy)` for all database testers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Parallelize type tests for faster execution
Use parallel streams and unique table names per test case to enable
concurrent execution across PgTypeTest, MariaTypeTest, DuckDbTypeTest,
OracleTypeTest, SqlServerTypeTest, and Db2TypeTest.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix remaining Kotlin and Java test helpers to use new Transactor API
- Update DuckDB Kotlin to use DriverManager.getConnection
- Update DB2 Java to use Transactor pattern
- Update all Kotlin test helpers to use CONFIG.transactor() method
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 642837d commit 630b42f
46 files changed
Lines changed: 1214 additions & 1047 deletions
File tree
- .github/workflows
- foundations-jdbc-hikari/src/java/dev/typr/foundations/hikari
- foundations-jdbc-test/src/java/dev/typr/foundations
- foundations-jdbc/src/java/dev/typr/foundations
- connect
- test-utils/src/java/dev/typr/testutils
- testers
- db2
- java/src/java/testdb
- kotlin/src/kotlin/testdb
- scala/src/scala/testdb
- duckdb
- java/src/java/testdb
- kotlin/src/kotlin/testdb
- scala/src/scala/testdb
- mariadb
- java/src/java/testdb
- kotlin/src/kotlin/testdb
- scala/src/scala/testdb
- oracle
- java/src/java/oracledb
- kotlin/src/kotlin/oracledb
- scala-new/src/scala/oracledb
- scala/src/scala/oracledb
- pg
- java/src/java/adventureworks
- kotlin/src/test/kotlin/adventureworks
- scala
- anorm/src/scala/adventureworks
- doobie/src/scala/adventureworks
- javatypes/src/scala/adventureworks
- scalatypes/src/scala/adventureworks
- zio-jdbc/src/scala/adventureworks
- sqlserver
- java/src/java/testdb
- kotlin/src/kotlin/testdb
- scala/src/scala/testdb
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
| |||
346 | 351 | | |
347 | 352 | | |
348 | 353 | | |
349 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
350 | 357 | | |
351 | 358 | | |
352 | 359 | | |
| |||
359 | 366 | | |
360 | 367 | | |
361 | 368 | | |
362 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
363 | 372 | | |
364 | 373 | | |
365 | 374 | | |
| |||
373 | 382 | | |
374 | 383 | | |
375 | 384 | | |
376 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
377 | 388 | | |
378 | 389 | | |
379 | 390 | | |
| |||
387 | 398 | | |
388 | 399 | | |
389 | 400 | | |
390 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
391 | 404 | | |
392 | 405 | | |
393 | 406 | | |
| |||
401 | 414 | | |
402 | 415 | | |
403 | 416 | | |
404 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
405 | 420 | | |
406 | 421 | | |
407 | 422 | | |
| |||
Lines changed: 63 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
28 | | - | |
29 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 33 | + | |
48 | 34 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
52 | 39 | | |
53 | | - | |
| 40 | + | |
| 41 | + | |
54 | 42 | | |
55 | 43 | | |
56 | 44 | | |
| |||
73 | 61 | | |
74 | 62 | | |
75 | 63 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
79 | 67 | | |
80 | | - | |
81 | | - | |
| 68 | + | |
| 69 | + | |
82 | 70 | | |
83 | | - | |
84 | | - | |
| 71 | + | |
| 72 | + | |
85 | 73 | | |
86 | | - | |
87 | | - | |
| 74 | + | |
| 75 | + | |
88 | 76 | | |
89 | | - | |
90 | | - | |
| 77 | + | |
| 78 | + | |
91 | 79 | | |
92 | | - | |
93 | | - | |
| 80 | + | |
| 81 | + | |
94 | 82 | | |
| 83 | + | |
| 84 | + | |
95 | 85 | | |
96 | 86 | | |
97 | 87 | | |
| |||
117 | 107 | | |
118 | 108 | | |
119 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
120 | 142 | | |
0 commit comments