diff --git a/CHANGELOG b/CHANGELOG index 8c4ff5840..e9c0034ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,15 @@ +0.3.1 + * BREAKING CHANGE - move query from url to request body + * BREAKING CHANGE - always parse SQL(use extended API to skip that) + * BREAKING CHANGE - remove keepAliveTimeout and useNewParser from ClickHouseProperties + * BREAKING CHANGE - exclude RoaringBitmap from shaded jar + * add new connection setting useSharedCookieStore for load balancing + * add new query parameters: allow_experimental_bigint_types, allow_experimental_map_type, and join_algorithm + * add new format: CustomSeparated and RowBinaryWithNamesAndTypes + * fix 400 bad request error when dealing with large query + * fix parser issue when DESC statement contains alias + * support batch processing with arbitrary query - update and delete are not recommended so there'll be warnings + * support multi-statement sql - session will be used automatically and only the last result will be returned 0.3.0 * BREAKING CHANGE - dropped JDK 7 support * BREAKING CHANGE - removed Guava dependency(and so is UnsignedLong) diff --git a/README.md b/README.md index 400d8acaf..b615e9ed8 100644 --- a/README.md +++ b/README.md @@ -20,28 +20,32 @@ URL syntax: JDBC Driver Class: `ru.yandex.clickhouse.ClickHouseDriver` -additionally, if you have a few instances, you can use `BalancedClickhouseDataSource`. - -**Notice** - -To use an up-to-date version of RoaringBitmap, please update your POM with below two changes: -```xml - - - - jitpack.io - https://jitpack.io - - +For example: +```java +String url = "jdbc:clickhouse://localhost:8123/test"; +ClickHouseProperties properties = new ClickHouseProperties(); +// set connection options - see more defined in ClickHouseConnectionSettings +properties.setClientName("Agent #1"); +... +// set default request options - more in ClickHouseQueryParam +properties.setSessionId("default-session-id"); +... - - - com.github.RoaringBitmap - RoaringBitmap - 0.9.10 - +ClickHouseDataSource dataSource = new ClickHouseDataSource(url, properties) +String sql = "select * from mytable"; +Map additionalDBParams = new HashMap<>(); +// set request options, which will override the default ones in ClickHouseProperties +additionalDBParams.put(ClickHouseQueryParam.SESSION_ID, "new-session-id"); +... +try (ClickHouseConnection conn = dataSource.getConnection(); + ClickHouseStatement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery(sql, additionalDBParams)) { + ... +} ``` +Additionally, if you have a few instances, you can use `BalancedClickhouseDataSource`. + ### Extended API In order to provide non-JDBC complaint data manipulation functionality, proprietary API exists. Entry point for API is `ClickHouseStatement#write()` method. diff --git a/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/domain/ClickHouseFormat.java b/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/domain/ClickHouseFormat.java index 176573e05..773914c05 100644 --- a/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/domain/ClickHouseFormat.java +++ b/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/domain/ClickHouseFormat.java @@ -13,7 +13,7 @@ * @author Dmitry Andreev */ public enum ClickHouseFormat { - + CustomSeparated, TabSeparated, TabSeparatedRaw, TabSeparatedWithNames, diff --git a/pom.xml b/pom.xml index ad2af80c6..8fe3731b0 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ 1.7.1 2.9.10 2.9.10.8 - 0.9.3 + 0.9.10 1.7.30 1.10.19 2.27.2 @@ -432,14 +432,4 @@ - -