Skip to content

Commit 3d5c0c1

Browse files
author
Jove Zhong
committed
add connectTimeout for /jdbc, close #348
1 parent 9f53d34 commit 3d5c0c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/jdbc.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ dependencies {
3333

3434
Please note, by default Timeplus' query behavior is streaming SQL, looking for new data in the future and never ends. The `ResultSet.next()` can always return `true`.
3535

36+
#### connect_timeout
37+
You can set the connection timeout by adding `connect_timeout=10` to the JDBC URL, which will wait for 10 seconds before giving up. For example: `jdbc:timeplus://host:port/database?connect_timeout=10`. The default is 0, which means no timeout.
38+
39+
Alternatively, you can set the `connectTimeout` property programmatically, such as:
40+
```java
41+
TimeplusConfig config = TimeplusConfig.Builder.builder()
42+
.connectTimeout(Duration.ofSeconds(10))
43+
.build();
44+
```
3645
### Example {#example_native}
3746

3847
```java

0 commit comments

Comments
 (0)