doc: change rest connection sample as the default in tabs

This commit is contained in:
gccgdb1234 2022-09-29 16:18:47 +08:00
parent 679145dcb6
commit f1d492f628
10 changed files with 33 additions and 30 deletions

View File

@ -109,7 +109,7 @@ TDengine's JDBC URL specification format is:
For establishing connections, native connections differ slightly from REST connections.
<Tabs defaultValue="native">
<Tabs defaultValue="rest">
<TabItem value="native" label="native connection">
```java

View File

@ -113,7 +113,7 @@ username:password@protocol(address)/dbname?param=value
```
### Connecting via connector
<Tabs defaultValue="native">
<Tabs defaultValue="rest">
<TabItem value="native" label="native connection">
_taosSql_ implements Go's `database/sql/driver` interface via cgo. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver.

View File

@ -55,16 +55,6 @@ taos = "*"
</TabItem>
<TabItem value="native" label="native connection only">
In `cargo.toml`, add [taos][taos] and enable the native feature:
```toml
[dependencies]
taos = { version = "*", default-features = false, features = ["native"] }
```
</TabItem>
<TabItem value="rest" label="Websocket only">
In `cargo.toml`, add [taos][taos] and enable the ws feature:
@ -75,6 +65,18 @@ taos = { version = "*", default-features = false, features = ["ws"] }
```
</TabItem>
<TabItem value="native" label="native connection only">
In `cargo.toml`, add [taos][taos] and enable the native feature:
```toml
[dependencies]
taos = { version = "*", default-features = false, features = ["native"] }
```
</TabItem>
</Tabs>
## Establishing a connection

View File

@ -81,7 +81,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git
### Verify
<Tabs groupId="connect" default="native">
<TabItem value="native" label="native connection">
<TabItem value="rest" label="native connection">
For native connection, you need to verify that both the client driver and the Python connector itself are installed correctly. The client driver and Python connector have been installed properly if you can successfully import the `taos` module. In the Python Interactive Shell, you can type.

View File

@ -85,7 +85,7 @@ If using ARM64 Node.js on Windows 10 ARM, you must add "Visual C++ compilers and
### Install via npm
<Tabs defaultValue="install_native">
<Tabs defaultValue="install_rest">
<TabItem value="install_native" label="Install native connector">
```bash
@ -124,7 +124,7 @@ node nodejsChecker.js host=localhost
Please choose to use one of the connectors.
<Tabs defaultValue="native">
<Tabs defaultValue="rest">
<TabItem value="native" label="native connection">
Install and import the `@tdengine/client` package.

View File

@ -109,7 +109,7 @@ TDengine 的 JDBC URL 规范格式为:
对于建立连接,原生连接与 REST 连接有细微不同。
<Tabs defaultValue="native">
<Tabs defaultValue="rest">
<TabItem value="native" label="原生连接">
```java

View File

@ -114,7 +114,7 @@ username:password@protocol(address)/dbname?param=value
```
### 使用连接器进行连接
<Tabs defaultValue="native">
<Tabs defaultValue="rest">
<TabItem value="native" label="原生连接">
_taosSql_ 通过 cgo 实现了 Go 的 `database/sql/driver` 接口。只需要引入驱动就可以使用 [`database/sql`](https://golang.org/pkg/database/sql/) 的接口。

View File

@ -55,16 +55,6 @@ taos = "*"
</TabItem>
<TabItem value="native" label="仅原生连接">
在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `native` 特性:
```toml
[dependencies]
taos = { version = "*", default-features = false, features = ["native"] }
```
</TabItem>
<TabItem value="rest" label="仅 Websocket">
在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `ws` 特性。
@ -74,6 +64,17 @@ taos = { version = "*", default-features = false, features = ["native"] }
taos = { version = "*", default-features = false, features = ["ws"] }
```
</TabItem>
<TabItem value="native" label="仅原生连接">
在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `native` 特性:
```toml
[dependencies]
taos = { version = "*", default-features = false, features = ["native"] }
```
</TabItem>
</Tabs>

View File

@ -80,7 +80,7 @@ pip3 install git+https://github.com/taosdata/taos-connector-python.git
### 安装验证
<Tabs groupId="connect" default="native">
<Tabs groupId="connect" default="rest">
<TabItem value="native" label="原生连接">
对于原生连接,需要验证客户端驱动和 Python 连接器本身是否都正确安装。如果能成功导入 `taos` 模块,则说明已经正确安装了客户端驱动和 Python 连接器。可在 Python 交互式 Shell 中输入:

View File

@ -85,7 +85,7 @@ REST 连接器支持所有能运行 Node.js 的平台。
### 使用 npm 安装
<Tabs defaultValue="install_native">
<Tabs defaultValue="install_rest">
<TabItem value="install_native" label="安装原生连接器">
```bash
@ -124,7 +124,7 @@ node nodejsChecker.js host=localhost
请选择使用一种连接器。
<Tabs defaultValue="native">
<Tabs defaultValue="rest">
<TabItem value="native" label="原生连接">
安装并引用 `@tdengine/client` 包。