Skip to content

About

ClickHouse driver for Quarkus with Agroal and native mode support

Topics

Resources

Stars

6 stars

Watchers

3 watching

Forks

Repository files navigation

Quarkus JDBC ClickHouse extension

All Contributors

Build Version License

Quarkus JDBC ClickHouse is a Quarkus extension for the ClickHouse database.

Configuration

Besides the standard quarkus.datasource.jdbc.* settings, the extension also supports ClickHouse-specific aliases under quarkus.datasource.clickhouse.*.

Example:

quarkus.datasource.db-kind=clickhouse
quarkus.datasource.jdbc.url=jdbc:clickhouse:http://localhost:8123/default
quarkus.datasource.clickhouse.client-name=my-service
quarkus.datasource.clickhouse.compress=true
quarkus.datasource.clickhouse.socket-keepalive=true
quarkus.datasource.clickhouse.properties.beta.row_binary_for_simple_insert=true

Named datasources are supported as well:

quarkus.datasource."analytics".db-kind=clickhouse
quarkus.datasource."analytics".jdbc.url=jdbc:clickhouse:http://localhost:8123/default
quarkus.datasource."analytics".clickhouse.client-name=analytics-client
quarkus.datasource."analytics".clickhouse.socket-keepalive=false

The aliases are translated to quarkus.datasource[."name"].jdbc.additional-jdbc-properties.*, so raw driver properties remain available through ...clickhouse.properties.*.

Currently supported aliases include:

  • client-name
  • compress
  • decompress
  • connection-timeout
  • socket-timeout
  • socket-keepalive
  • ssl
  • ssl-mode
  • use-server-time-zone
  • use-time-zone
  • session-id
  • session-check
  • beta-row-binary-for-simple-insert
  • properties.*

Each property is documented in the Quarkiverse documentation with its purpose and effect on the underlying ClickHouse JDBC driver configuration.

Testing

The project follows the usual Quarkus extension split between runtime, deployment, and integration-tests.

  • mvn verify -Pit runs the JVM integration tests
  • mvn verify -Pit -Dnative builds the native runner and executes native integration tests

User Documentation

https://quarkiverse.github.io/quarkiverse-docs/quarkus-jdbc-clickhouse/dev/index.html

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Alexey Sharandin

💻 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

About

ClickHouse driver for Quarkus with Agroal and native mode support

Topics

Resources

Stars

6 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages