Skip to content

Commit 45d2389

Browse files
author
Paultagoras
committed
Style changes
1 parent da1324e commit 45d2389

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

docs/en/integrations/language-clients/java/jdbc-v1.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ try (PreparedStatement stmt = conn.prepareStatement(
275275
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/).
276276

277277
:::note
278-
HttpClient is only supported in JDK 11 or above.
278+
`HttpClient` is only supported in JDK 11 or above.
279279
:::
280280

281281
The JDBC driver uses `HttpClient` by default. You can change the HTTP library used by the ClickHouse JDBC connector by setting the following property:
@@ -286,11 +286,11 @@ properties.setProperty("http_connection_provider", "APACHE_HTTP_CLIENT");
286286

287287
Here is a full list of the corresponding values:
288288

289-
| Property Value | HTTP Library |
290-
| ------------------- | ----------------- |
291-
| HTTP_CLIENT | HttpClient |
292-
| HTTP_URL_CONNECTION | HttpURLConnection |
293-
| APACHE_HTTP_CLIENT | Apache HttpClient |
289+
| Property Value | HTTP Library |
290+
|---------------------|---------------------|
291+
| HTTP_CLIENT | `HttpClient` |
292+
| HTTP_URL_CONNECTION | `HttpURLConnection` |
293+
| APACHE_HTTP_CLIENT | Apache `HttpClient` |
294294

295295
<br/>
296296

@@ -301,15 +301,15 @@ To establish a secure JDBC connection to ClickHouse using SSL, you need to confi
301301
## SSL Properties
302302

303303
| Name | Default Value | Optional Values | Description |
304-
| ------------------ | ------------- | --------------- | ---------------------------------------------------------------------------- |
304+
| ------------------ | ------------- | --------------- |------------------------------------------------------------------------------|
305305
| `ssl` | false | true, false | Whether to enable SSL/TLS for the connection |
306306
| `sslmode` | strict | strict, none | Whether to verify SSL/TLS certificate |
307307
| `sslrootcert` | | | Path to SSL/TLS root certificates |
308308
| `sslcert` | | | Path to SSL/TLS certificate |
309309
| `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 |
311311
| `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 |
313313

314314
These properties ensure that your Java application communicates with the ClickHouse server over an encrypted connection, enhancing data security during transmission.
315315

docs/en/integrations/language-clients/java/jdbc-v2.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,13 @@ We recommend using [client-v2](/docs/en/integrations/language-clients/java/clien
1919
## Changes from 0.7.x
2020
In 0.8 we tried to make the driver more strictly follow the JDBC specification, so there are some removed features that may affect you:
2121

22-
| Old Feature | Notes |
23-
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
24-
| 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
35-
timezone if no calendar is provided).
22+
| Old Feature | Notes |
23+
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
24+
| 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). |
3629

3730
:::note
3831
`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
10093

10194
JDBC Driver supports the same data formats as the underlying [client](/docs/en/integrations/language-clients/java/client-v2.md).
10295

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.
100+
103101
## Creating Connection
104102

105103
```java
@@ -158,7 +156,7 @@ try (PreparedStatement ps = conn.prepareStatement("INSERT INTO mytable VALUES (?
158156
}
159157
```
160158

161-
## Hikari
159+
## `Hikari`
162160

163161
```java showLineNumbers
164162
// connection pooling won't help much in terms of performance,
@@ -187,7 +185,7 @@ For more information, see our [GitHub repository](https://github.com/ClickHouse/
187185

188186
## Troubleshooting
189187
### Logging
190-
The driver uses [slf4j](https://www.slf4j.org/) for logging, and will use the first available implementation on the classpath.
188+
The driver uses [slf4j](https://www.slf4j.org/) for logging, and will use the first available implementation on the `classpath`.
191189

192190
### Resolving JDBC Timeout on Large Inserts
193191

0 commit comments

Comments
 (0)