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
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
276
277
277
:::note
278
-
HttpClient is only supported in JDK 11 or above.
278
+
`HttpClient` is only supported in JDK 11 or above.
279
279
:::
280
280
281
281
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 |
308
308
|`sslcert`||| Path to SSL/TLS certificate |
309
309
|`sslkey`||| RSA key in PKCS#8 format |
310
-
|`key_store_type`|| JKS, PKCS12 | Specifies the type or format of the KeyStore/Truststore file|
310
+
|`key_store_type`|| JKS, PKCS12 | Specifies the type or format of the `KeyStore`/`TrustStore` file |
311
311
|`trust_store`||| Path to the Truststore file |
312
-
|`key_store_password`||| Password needed to access the KeyStore file specified in the KeyStore config |
312
+
|`key_store_password`||| Password needed to access the `KeyStore` file specified in the `KeyStore` config |
313
313
314
314
These properties ensure that your Java application communicates with the ClickHouse server over an encrypted connection, enhancing data security during transmission.
| Transaction Support | Early versions of the driver only **simulated** transaction support, which could have unexpected results. |
25
-
| Response Column Renaming | ResultSets were mutable - for efficiency sake they're now read-only |
26
-
| Multi-Statement SQL | Multi-statement support was only **simulated**, now it strictly follows 1:1 |
27
-
| Named Parameters | Not part of the JDBC spec |
28
-
| Stream-based PreparedStatements | Early version of the driver allowed for non-jdbc usage of PreparedStatements - if you desire such options, we recommend looking at [Client-V2](/docs/en/integrations/language-clients/java/client-v2.md) and its [examples](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2). |
29
-
30
-
### Handling Dates, Times, and Timezones
31
-
java.sql.Date, java.sql.Time, and java.sql.Timestamp can complicate how Timezones are calculated - though they're of course supported,
32
-
you may want to consider using the [java.time](https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html) package for new code. [ZonedDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html) and
33
-
[OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) are great replacements for java.sql.Timestamp,
34
-
and [LocalDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html) could be used for java.sql.Date and java.sql.Time (though the JDBC driver will assume local
| Transaction Support | Early versions of the driver only **simulated** transaction support, which could have unexpected results. |
25
+
| Response Column Renaming |`ResultSet` was mutable - for efficiency sake they're now read-only |
26
+
| Multi-Statement SQL | Multi-statement support was only **simulated**, now it strictly follows 1:1 |
27
+
| Named Parameters | Not part of the JDBC spec |
28
+
| Stream-based `PreparedStatement`| Early version of the driver allowed for non-jdbc usage of `PreparedStatement` - if you desire such options, we recommend looking at [Client-V2](/docs/en/integrations/language-clients/java/client-v2.md) and its [examples](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2). |
36
29
37
30
:::note
38
31
`Date` is stored without timezone, while `DateTime` is stored with timezone. This can lead to unexpected results if you're not careful.
@@ -100,6 +93,11 @@ Where possible methods will return an `SQLFeatureNotSupportedException` if the f
100
93
101
94
JDBC Driver supports the same data formats as the underlying [client](/docs/en/integrations/language-clients/java/client-v2.md).
102
95
96
+
### Handling Dates, Times, and Timezones
97
+
`java.sql.Date`, `java.sql.Time`, and `java.sql.Timestamp` can complicate how Timezones are calculated - though they're of course supported,
98
+
you may want to consider using the [java.time](https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html) package. `ZonedDateTime` and
99
+
`OffsetDateTime` are both great replacements for java.sql.Timestamp, java.sql.Date, and java.sql.Time.
0 commit comments