未验证 提交 53dd6499 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

docs: connector refine (#11860)

* docs: refine connector doc

[TD-14839]

* docs: use TDengine CLI

[TD-14839]

* docs: replace JNI with navtive connection

[TD-14839]

* docs: make connectors doc use same preparition

[TD-14839]

* docs: refine connectors doc

[TD-14839]

* docs: refine connectors doc

[TD-14839]

* docs: refine connector docs

* docs: refine connector doc

[TD-14839]

* docs: refine connector doc

[TD-14839]

* docs: refine connector

[TD-14839]

* docs: fix faq path

* docs: refine cpp connector doc

* docs: refine cpp docs

* docs: fix java preparition

* docs: refine connector docs

* docs: refine connector docs

[TD-14839]

* docs: refine connector doc

[TD-14839]

* docs: refine connector docs

[TD-14839]

* docs: fix node.mdx

[TD-14839]

* docs: refine connector

[TD-14839]
上级 69c37110
......@@ -61,7 +61,7 @@ REST 连接指连接器通过 taosAdapter 组件提供的 REST API 建立与 tao
## 建立连接
### DSN
### 数据源名称(DSN
数据源名称具有通用格式,例如 [PEAR DB](http://pear.php.net/manual/en/package.database.db.intro-dsn.php),但没有类型前缀(方括号表示可选):
......
......@@ -711,9 +711,9 @@ conn.close();
> `注意务必要将 connection 进行关闭`,否则会出现连接泄露。
## 与连接池使用
### 与连接池使用
### HikariCP
#### HikariCP
使用示例如下:
......@@ -747,7 +747,7 @@ conn.close();
> 通过 HikariDataSource.getConnection() 获取连接后,使用完成后需要调用 close() 方法,实际上它并不会关闭连接,只是放回连接池中。
> 更多 HikariCP 使用问题请查看[官方说明](https://github.com/brettwooldridge/HikariCP)。
### Druid
#### Druid
使用示例如下:
......@@ -792,7 +792,7 @@ server_status()|
Query OK, 1 row(s) in set (0.000141s)
```
## 示例程序
### 更多示例程序
示例程序源码位于 `TDengine/examples/JDBC` 下:
......
---
toc_max_heading_level: 3
toc_max_heading_level: 4
sidebar_position: 5
sidebar_label: Rust
title: Rust Connector
......@@ -142,15 +142,15 @@ async fn demo() -> Result<(), Error> {
<RustInsert />
### InfluxDB 行协议写入
#### InfluxDB 行协议写入
<RustInfluxLine />
### OpenTSDB Telnet 行协议写入
#### OpenTSDB Telnet 行协议写入
<RustOpenTSDBTelnet />
### OpenTSDB JSON 行协议写入
#### OpenTSDB JSON 行协议写入
<RustOpenTSDBJson />
......@@ -280,11 +280,11 @@ let mut stmt: Stmt = taos.stmt("insert into ? values(?,?)")?;
参数绑定对象提供了一组接口用于实现参数绑定:
#### `.set_tbname(tbname: impl ToCString)`
##### `.set_tbname(tbname: impl ToCString)`
用于绑定表名。
#### `.set_tbname_tags(tbname: impl ToCString, tags: impl IntoParams)`
##### `.set_tbname_tags(tbname: impl ToCString, tags: impl IntoParams)`
当 SQL 语句使用超级表时,用于绑定子表表名和标签值:
......@@ -295,7 +295,7 @@ let v = Field::Json(serde_json::from_str("{\"tag1\":\"一二三四五六七八
stmt.set_tbname_tags("tb0", [&tag])?;
```
#### `.bind(params: impl IntoParams)`
##### `.bind(params: impl IntoParams)`
用于绑定值类型。使用 [Field] 结构体构建需要的类型并绑定:
......@@ -305,7 +305,7 @@ let value = Field::Float(0.0);
stmt.bind(vec![ts, value].iter())?;
```
#### `.execute()`
##### `.execute()`
执行 SQL。[Stmt] 对象可以复用,在执行后可以重新绑定并执行。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册