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

docs: connector refine (#11829)

* 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]
上级 6bc95596
......@@ -5,6 +5,12 @@ title: C# Connector
---
import Preparition from "./_preparition.mdx"
import CSInsert from "../../04-develop/03-insert-data/_cs_sql.mdx"
import CSInfluxLine from "../../04-develop/03-insert-data/_cs_line.mdx"
import CSOpenTSDBTelnet from "../../04-develop/03-insert-data/_cs_opts_telnet.mdx"
import CSOpenTSDBJson from "../../04-develop/03-insert-data/_cs_opts_json.mdx"
import CSQuery from "../../04-develop/04-query-data/_cs.mdx"
import CSAsyncQuery from "../../04-develop/04-query-data/_cs_async.mdx"
## 总体介绍
......@@ -100,6 +106,32 @@ namespace TDengineExample
## 使用示例
#### SQL 写入
<CSInsert />
#### InfluxDB 行协议写入
<CSInfluxLine />
#### OpenTSDB Telnet 行协议写入
<CSOpenTSDBTelnet />
#### OpenTSDB JSON 行协议写入
<CSOpenTSDBJson />
### 查询数据
<CSQuery />
### 异步查询
<CSAsyncQuery />
## 更多示例程序
|示例程序 | 示例程序描述 |
|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
| [C#checker](https://github.com/taosdata/TDengine/tree/develop/examples/C%23/C%23checker) | 使用 TDengine.Connector 可以通过 help 命令中提供的参数,测试C# Driver的同步写入和查询 |
......
......@@ -5,6 +5,11 @@ title: Go Connector
---
import Preparition from "./_preparition.mdx"
import GoInsert from "../../04-develop/03-insert-data/_go_sql.mdx"
import GoInfluxLine from "../../04-develop/03-insert-data/_go_line.mdx"
import GoOpenTSDBTelnet from "../../04-develop/03-insert-data/_go_opts_telnet.mdx"
import GoOpenTSDBJson from "../../04-develop/03-insert-data/_go_opts_json.mdx"
import GoQuery from "../../04-develop/04-query-data/_go.mdx"
## 总体介绍
......@@ -132,9 +137,31 @@ func main() {
}
```
## 示例程序
## 使用示例
使用 Go 连接器的示例代码请参考:
### 写入数据
#### SQL 写入
<GoInsert />
#### InfluxDB 行协议写入
<GoInfluxLine />
#### OpenTSDB Telnet 行协议写入
<GoOpenTSDBTelnet />
#### OpenTSDB JSON 行协议写入
<GoOpenTSDBJson />
### 查询数据
<GoQuery />
### 更多示例程序
* [示例程序](https://github.com/taosdata/TDengine/tree/develop/examples/go)
* [视频教程](https://www.taosdata.com/blog/2020/11/11/1951.html)
......
......@@ -833,7 +833,7 @@ Query OK, 1 row(s) in set (0.000141s)
## 示例程序
示例程序源码位于 TDengine/test/examples/JDBC 下:
示例程序源码位于 `TDengine/examples/JDBC` 下:
- JDBCDemo:JDBC 示例源程序
- JDBCConnectorChecker:JDBC 安装校验源程序及 jar 包
......@@ -852,8 +852,8 @@ Query OK, 1 row(s) in set (0.000141s)
## 常见问题
- 使用 Statement 的 addBatch 和 executeBatch 来执行“批量写入/更行”,为什么没有带来性能上的提升?
**原因**:TDengine 的 JDBC 实现中,通过 addBatch 方法提交的 SQL 语句,会按照添加的顺序,依次执行,这种方式没有减少与服务端的交互次数,不会带来性能上的提升。
- 使用 Statement 的 `addBatch` 和 `executeBatch` 来执行“批量写入/更行”,为什么没有带来性能上的提升?
**原因**:TDengine 的 JDBC 实现中,通过 `addBatch` 方法提交的 SQL 语句,会按照添加的顺序,依次执行,这种方式没有减少与服务端的交互次数,不会带来性能上的提升。
**解决方法**:1. 在一条 insert 语句中拼接多个 values 值;2. 使用多线程的方式并发插入;3. 使用参数绑定的写入方式
- java.lang.UnsatisfiedLinkError: no taos in java.library.path
**原因**:程序没有找到依赖的本地函数库 taos。
......
......@@ -5,6 +5,12 @@ title: Node.js Connector
---
import Preparition from "./_preparition.mdx"
import NodeInsert from "../../04-develop/03-insert-data/_js_sql.mdx"
import NodeInfluxLine from "../../04-develop/03-insert-data/_js_line.mdx"
import NodeOpenTSDBTelnet from "../../04-develop/03-insert-data/_js_opts_telnet.mdx"
import NodeOpenTSDBJson from "../../04-develop/03-insert-data/_js_opts_json.mdx"
import NodeQuery from "../../04-develop/04-query-data/_js.mdx"
import NodeAsyncQuery from "../../04-develop/04-query-data/_js_async.mdx"
## 总体介绍
......@@ -140,7 +146,32 @@ let cursor = conn.cursor();
```
## 使用示例
| 示例程序 | 示例程序描述 |
#### SQL 写入
<NodeInsert />
#### InfluxDB 行协议写入
<NodeInfluxLine />
#### OpenTSDB Telnet 行协议写入
<NodeOpenTSDBTelnet />
#### OpenTSDB JSON 行协议写入
<NodeOpenTSDBJson />
### 查询数据
<NodeQuery />
### 异步查询
<NodeAsyncQuery />
### 更多示例程序 | 示例程序描述 |
|-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|
| [connection](https://github.com/taosdata/TDengine/blob/develop/src/connector/nodejs/examples/cursorClose.js) | 建立连接的示例。 |
| [stmtBindBatch](https://github.com/taosdata/TDengine/blob/develop/src/connector/nodejs/examples/stmtBindParamBatchSample.js) | 绑定多行参数插入的示例。 |
......
......@@ -5,6 +5,11 @@ title: Rust Connector
---
import Preparition from "./_preparition.mdx"
import RustInsert from "../../04-develop/03-insert-data/_rust_sql.mdx"
import RustInfluxLine from "../../04-develop/03-insert-data/_rust_line.mdx"
import RustOpenTSDBTelnet from "../../04-develop/03-insert-data/_rust_opts_telnet.mdx"
import RustOpenTSDBJson from "../../04-develop/03-insert-data/_rust_opts_json.mdx"
import RustQuery from "../../04-develop/04-query-data/_rust.mdx"
[![Crates.io](https://img.shields.io/crates/v/libtaos)](https://crates.io/crates/libtaos) ![Crates.io](https://img.shields.io/crates/d/libtaos) [![docs.rs](https://img.shields.io/docsrs/libtaos)](https://docs.rs/libtaos)
......@@ -130,6 +135,28 @@ async fn demo() -> Result<(), Error> {
## 使用示例
#### SQL 写入
<RustInsert />
#### InfluxDB 行协议写入
<RustInfluxLine />
#### OpenTSDB Telnet 行协议写入
<RustOpenTSDBTelnet />
#### OpenTSDB JSON 行协议写入
<RustOpenTSDBJson />
### 查询数据
<RustQuery />
### 更多示例程序
| 程序路径 | 程序说明 |
| -------------- | ----------------------------------------------------------------------------- |
| [demo.rs] | 基本API 使用示例 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册