diff --git a/docs-cn/14-reference/03-connector/go.mdx b/docs-cn/14-reference/03-connector/go.mdx index 94384a0e1028d24d71898b7a064323ffd4fba64f..ca7353175e148c5a3abd0bceff30453331438556 100644 --- a/docs-cn/14-reference/03-connector/go.mdx +++ b/docs-cn/14-reference/03-connector/go.mdx @@ -167,7 +167,7 @@ func main() { * [示例程序](https://github.com/taosdata/TDengine/tree/develop/examples/go) * [视频教程](https://www.taosdata.com/blog/2020/11/11/1951.html)。 -### 使用限制 +## 使用限制 由于 REST 接口无状态所以 `use db` 语法不会生效,需要将 db 名称放到 SQL 语句中,如:`create table if not exists tb1 (ts timestamp, a int)`改为`create table if not exists test.tb1 (ts timestamp, a int)`否则将报错`[0x217] Database not specified or available`。 @@ -223,7 +223,7 @@ func main() { } ``` -### 常见问题 +## 常见问题 * 无法找到包 `github.com/taosdata/driver-go/v2/taosRestful` @@ -257,9 +257,9 @@ REST 不支持 stmt 相关接口,建议使用`db.Exec`和`db.Query`。 设置 Go 代理 `go env -w GOPROXY=https://goproxy.cn,direct`。 -### 常用 API +## 常用 API -#### `database/sql` +### `database/sql` * `sql.Open(DRIVER_NAME string, dataSourceName string) *DB` @@ -275,7 +275,7 @@ REST 不支持 stmt 相关接口,建议使用`db.Exec`和`db.Query`。 `sql.Open` 内置的方法,用来执行查询语句。 -#### 高级功能 +### 高级功能 af 包封装了订阅、stmt 等 TDengine 高级功能。 @@ -295,7 +295,7 @@ stmt 单行插入。 stmt 查询,返回 `database/sql/driver` 包的 `Rows` 结构。 -##### 订阅 +订阅 * `func (conn *Connector) Subscribe(restart bool, topic string, sql string, interval time.Duration) (Subscriber, error)` @@ -309,7 +309,7 @@ stmt 查询,返回 `database/sql/driver` 包的 `Rows` 结构。 取消订阅数据。 -##### schemaless 写入 +schemaless 写入 * `func (conn *Connector) InfluxDBInsertLines(lines []string, precision string) error` @@ -323,7 +323,7 @@ stmt 查询,返回 `database/sql/driver` 包的 `Rows` 结构。 写入 OpenTSDB json 协议。 -##### 批量 stmt 插入 +批量 stmt 插入 * `func (conn *Connector) InsertStmt() *insertstmt.InsertStmt` diff --git a/docs-cn/14-reference/03-connector/node.mdx b/docs-cn/14-reference/03-connector/node.mdx index 2480ddd719ada9d384500d3ce8a4d011baa60ffe..0d57b6441b3bccc7a5524c517fc1cfa92fb4d58f 100644 --- a/docs-cn/14-reference/03-connector/node.mdx +++ b/docs-cn/14-reference/03-connector/node.mdx @@ -195,23 +195,11 @@ let cursor = conn.cursor(); Node.js 连接器 >= v2.0.6 目前支持 node 的版本为: 支持 >=v12.8.0 <= v12.9.1 || >=v10.20.0 <= v10.9.0 ;2.0.5 及更早版本支持 v10.x 版本,其他版本可能存在包兼容性的问题。 -## 重要更新记录 - -| td2.0-connector 版本 | 说明 | -|--------------------|----------------------------------------------------------------------| -| 2.0.10 | 支持连接管理,同步查询、异步查询、获取系统信息、错误信息、订阅功能。 | -| 2.0.11 | 支持绑定参数、json tag、schemaless insert。 | -| 2.0.12 | 修复 cursor.close() 报错的问题。 | - -| td2.0-rest-connector 版本 | 说明 | -|--------------------|--------------------------------------------------------------| -| 1.0.3 | 支持连接管理、同步查询、获取系统信息、错误信息、schemeless。 | - -## 其他说明(optional) +## 其他说明 Node.js 连接器的使用参见[视频教程](https://www.taosdata.com/blog/2020/11/11/1957.html)。 -## 常见问题(optional) +## 常见问题 1. 使用 REST 连接需要启动 taosadapter。 @@ -223,6 +211,22 @@ Node.js 连接器的使用参见[视频教程](https://www.taosdata.com/blog/202 3. "Unable to establish connection","Unable to resolve FQDN", 一般都是应为为配置 FQDN 可以参考[如何彻底搞懂 TDengine 的 FQDN](https://www.taosdata.com/blog/2021/07/29/2741.html) 。 +## 重要更新记录 + +### 原生接口连接器 + +| td2.0-connector 版本 | 说明 | +|--------------------|---------------------------------------------------------------------| +| 2.0.10 | 支持连接管理,同步查询、异步查询、获取系统信息、错误信息、订阅功能。| +| 2.0.11 | 支持绑定参数、json tag、schemaless insert。 | +| 2.0.12 | 修复 cursor.close() 报错的问题。 | + +### REST 接口连接器 + +| td2.0-rest-connector 版本 | 说明 | +|--------------------|---------------------------------------------------------------------| +| 1.0.3 | 支持连接管理、同步查询、获取系统信息、错误信息、schemeless。 | + ## API 参考 [API 参考](https://docs.taosdata.com/api/td2.0-connector/) diff --git a/docs-cn/14-reference/03-connector/rust.mdx b/docs-cn/14-reference/03-connector/rust.mdx index cfcf9bbdeb2ae067ad6d40255ea4ee8c2731489d..62ed478d730e6d866eb63a636060873be3770d45 100644 --- a/docs-cn/14-reference/03-connector/rust.mdx +++ b/docs-cn/14-reference/03-connector/rust.mdx @@ -1,5 +1,5 @@ --- -toc_max_heading_level: 4 +toc_max_heading_level: 3 sidebar_position: 5 sidebar_label: Rust title: Rust Connector @@ -136,7 +136,9 @@ async fn demo() -> Result<(), Error> { ## 使用示例 -### SQL 写入 +### 写入数据 + +#### SQL 写入