Repository navigation
feat: boot-db-jdbc-postgresql and boot-db-jdbc-mysql driver modules - #38
Merged
Merged
Conversation
Typed JdbcConfig implementations for PostgreSQL (PostgresqlConfig) and MySQL (MysqlConfig), decoded from db.jdbc, with Kodein and Metro bindings like boot-db-jdbc-sqlite. Each takes host, port, database and credentials, and passes typed driver settings (sslMode, timeouts, and so on) as connection properties. MysqlConfig turns on Connector/J's prepared statement cache, as HikariCP recommends. Each module brings its JDBC driver as api, and its Flyway database module as runtimeOnly, so boot-db-flyway works with it. Tests run against real servers with Testcontainers; they are skipped where Docker is unavailable, except on CI.
rocketraman
force-pushed
the
claude/boot-db-jdbc-modules-af10fa
branch
from
October 19, 2026 18:22
f63240a to
dc5818d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two new driver modules, alongside
boot-db-jdbc-sqlite:boot-db-jdbc-postgresql:PostgresqlConfig(host, port, database, credentials, plus typedcurrentSchema,applicationName,sslMode,connectTimeout,socketTimeout,reWriteBatchedInserts),postgresqlConfigModule(Kodein),PostgresqlConfigBindings(Metro).boot-db-jdbc-mysql:MysqlConfig(host, port, database, credentials, plus typedsslMode,allowPublicKeyRetrieval,connectTimeout,socketTimeout,rewriteBatchedStatements, prepared statement cache),mysqlConfigModule(Kodein),MysqlConfigBindings(Metro).Both decode from
db.jdbc, like the SQLite module.Design notes
nullkeep the driver's default, and there's no free-form properties map. For addresses this can't express (e.g. multi-host failover), the KDoc points toJdbcGenericConfig.cachePrepStmts, 250 statements, 2048-char limit), as HikariCP recommends. PostgreSQL keeps every driver default.toStringmasks the password, likeJdbcGenericConfig.api(pgjdbc 42.7.14, mysql-connector-j 26.7.0). The Flyway database module (flyway-database-postgresql/flyway-mysql) isruntimeOnly, soboot-db-flywayworks without the application adding it.Tests
db.pool), Kodein, and Metro. They build the pool without connecting.postgres:18-alpineandmysql:8.4containers, via Testcontainers 2.0.5. They check that connection settings reach the server and that a Flyway migration runs, which needs theruntimeOnlyFlyway module.CIis set, so they always run on GitHub Actions.AGENTS.mdnotes how to run them with rootless Podman../gradlew buildpasses locally, with the container tests running under Podman.