You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/integrations/language-clients/java/client-v2.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
-
sidebar_label: Client V2
2
+
sidebar_label: Client 0.8+
3
3
sidebar_position: 2
4
4
keywords: [clickhouse, java, client, integrate]
5
-
description: Java ClickHouse Connector v2
5
+
description: Java ClickHouse Connector 0.8+
6
6
slug: /en/integrations/java/client-v2
7
7
---
8
8
@@ -12,7 +12,12 @@ import CodeBlock from '@theme/CodeBlock';
12
12
13
13
# Java Client (V2)
14
14
15
-
Java client library to communicate with a DB server through its protocols. The current implementation only supports the [HTTP interface](/docs/en/interfaces/http). The library provides its own API to send requests to a server. The library also provides tools to work with different binary data formats (RowBinary* & Native*).
15
+
Java client library to communicate with a DB server through its protocols. The current implementation only supports the [HTTP interface](/docs/en/interfaces/http).
16
+
The library provides its own API to send requests to a server. The library also provides tools to work with different binary data formats (RowBinary* & Native*).
17
+
18
+
:::note
19
+
If you're looking for a prior version of the java client docs, please see [here](/docs/en/integrations/language-clients/java/client-v1.md).
@@ -16,7 +8,7 @@ import CodeBlock from '@theme/CodeBlock';
16
8
`clickhouse-jdbc` implements the standard JDBC interface. Being built on top of [clickhouse-client](/docs/en/integrations/sql-clients/sql-console), it provides additional features like custom type mapping, transaction support, and standard synchronous `UPDATE` and `DELETE` statements, etc., so that it can be easily used with legacy applications and tools.
17
9
18
10
:::note
19
-
Latest JDBC (0.7.2) version uses Client-V1
11
+
Latest JDBC (0.7.2) version uses Client-V1
20
12
:::
21
13
22
14
`clickhouse-jdbc` API is synchronous, and generally, it has more overheads(e.g., SQL parsing and type mapping/conversion, etc.). Consider [clickhouse-client](/docs/en/integrations/sql-clients/sql-console) when performance is critical or if you prefer a more direct way to access ClickHouse.
@@ -121,14 +113,14 @@ Note: please refer to [JDBC specific configuration](https://github.com/ClickHous
121
113
122
114
## Supported data types
123
115
124
-
JDBC Driver supports same data formats as client library does.
116
+
JDBC Driver supports same data formats as client library does.
125
117
126
118
:::note
127
119
- AggregatedFunction - :warning: does not support `SELECT * FROM table ...`
128
120
- Decimal - `SET output_format_decimal_trailing_zeros=1` in 21.9+ for consistency
129
121
- Enum - can be treated as both string and integer
This option is recommended only for small inserts because it would require a long SQL expression (that will be parsed on client side and it will consume CPU & Memory):
189
+
This option is recommended only for small inserts because it would require a long SQL expression (that will be parsed on client side and it will consume CPU & Memory):
198
190
199
191
```java showLineNumbers
200
192
try (PreparedStatement ps = conn.prepareStatement("insert into mytable values(trim(?),?,?)")) {
The ClickHouse JDBC connector supports three HTTP libraries: [HttpClient](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html), [HttpURLConnection](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/HttpURLConnection.html), and [Apache HttpClient](https://hc.apache.org/httpcomponents-client-5.2.x/).
267
+
The ClickHouse JDBC connector supports three HTTP libraries: [`HttpClient`](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html), [`HttpURLConnection`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/HttpURLConnection.html), and [Apache `HttpClient`](https://hc.apache.org/httpcomponents-client-5.2.x/).
276
268
277
269
:::note
278
-
HttpClient is only supported in JDK 11 or above.
270
+
`HttpClient` is only supported in JDK 11 or above.
279
271
:::
280
272
281
273
The JDBC driver uses `HttpClient` by default. You can change the HTTP library used by the ClickHouse JDBC connector by setting the following property:
|`sslrootcert`||| Path to SSL/TLS root certificates |
300
+
|`sslcert`||| Path to SSL/TLS certificate |
301
+
|`sslkey`||| RSA key in PKCS#8 format |
302
+
|`key_store_type`|| JKS, PKCS12 | Specifies the type or format of the `KeyStore`/`TrustStore` file |
303
+
|`trust_store`||| Path to the `TrustStore` file|
304
+
|`key_store_password`||| Password needed to access the `KeyStore` file specified in the `KeyStore` config |
313
305
314
306
These properties ensure that your Java application communicates with the ClickHouse server over an encrypted connection, enhancing data security during transmission.
0 commit comments