Skip to content

Commit

Permalink
Merge pull request #22030 from taosdata/docs/3.0/TS-3557
Browse files Browse the repository at this point in the history
docs(driver): java seek desc
  • Loading branch information
gccgdb1234 committed Jul 13, 2023
2 parents ec86a68 + 42d66f8 commit 18aad04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/en/14-reference/03-connector/04-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ REST connection supports all platforms that can run Java.

| taos-jdbcdriver version | major changes | TDengine version |
| :---------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------: |
| 3.2.4 | Subscription add the enable.auto.commit parameter and the unsubscribe() method in the WebSocket connection | 3.0.5.0 or later |
| 3.2.3 | Fixed resultSet data parsing failure in some cases | 3.0.5.0 or later |
| 3.2.4 | Subscription add the enable.auto.commit parameter and the unsubscribe() method in the WebSocket connection | - |
| 3.2.3 | Fixed resultSet data parsing failure in some cases | - |
| 3.2.2 | Subscription add seek function | 3.0.5.0 or later |
| 3.2.1 | JDBC REST connection supports schemaless/prepareStatement over WebSocket | 3.0.3.0 or later |
| 3.2.0 | This version has been deprecated | - |
Expand Down Expand Up @@ -1019,11 +1019,13 @@ while(true) {
#### Assignment subscription Offset

```java
// get offset
long position(TopicPartition partition) throws SQLException;
Map<TopicPartition, Long> position(String topic) throws SQLException;
Map<TopicPartition, Long> beginningOffsets(String topic) throws SQLException;
Map<TopicPartition, Long> endOffsets(String topic) throws SQLException;

// Overrides the fetch offsets that the consumer will use on the next poll(timeout).
void seek(TopicPartition partition, long offset) throws SQLException;
```

Expand Down
2 changes: 2 additions & 0 deletions docs/zh/08-connector/14-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1022,11 +1022,13 @@ while(true) {
#### 指定订阅 Offset

```java
// 获取 offset
long position(TopicPartition partition) throws SQLException;
Map<TopicPartition, Long> position(String topic) throws SQLException;
Map<TopicPartition, Long> beginningOffsets(String topic) throws SQLException;
Map<TopicPartition, Long> endOffsets(String topic) throws SQLException;

// 指定下一次 poll 中使用的 offset
void seek(TopicPartition partition, long offset) throws SQLException;
```

Expand Down

0 comments on commit 18aad04

Please sign in to comment.