diff --git a/docs-cn/04-develop/01-connect/_connect_cs.mdx b/docs-cn/04-develop/01-connect/_connect_cs.mdx index 204173dd329f6f214a9ea44c2f360be2cdbfdab8..821820e8fe1d87a35e01943530179eeb6e0f48be 100644 --- a/docs-cn/04-develop/01-connect/_connect_cs.mdx +++ b/docs-cn/04-develop/01-connect/_connect_cs.mdx @@ -1,7 +1,8 @@ ```csharp title="原生连接" {{#include docs-examples/csharp/ConnectExample.cs}} ``` + :::info C# 连接器目前只支持原生连接。 -::: \ No newline at end of file +::: diff --git a/docs-cn/04-develop/01-connect/_connect_go.mdx b/docs-cn/04-develop/01-connect/_connect_go.mdx index 4e4f189672f2fda4b807fe628d4455a41ac4cb69..478768caaacc8aceb9a3f5a85f008dde00125eb7 100644 --- a/docs-cn/04-develop/01-connect/_connect_go.mdx +++ b/docs-cn/04-develop/01-connect/_connect_go.mdx @@ -1,15 +1,17 @@ #### 使用数据库访问统一接口 + ```go title="原生连接" {{#include docs-examples/go/connect/cgoexample/main.go}} ``` + ```go title="REST 连接" {{#include docs-examples/go/connect/restexample/main.go}} ``` + #### 使用高级封装 + 也可以使用 driver-go 的 af 包建立连接。这个模块封装了 TDengine 的高级功能, 如:参数绑定、订阅等。 ```go title="使用 af 包建立原生连接" {{#include docs-examples/go/connect/afconn/main.go}} ``` - - diff --git a/docs-cn/04-develop/01-connect/_connect_java.mdx b/docs-cn/04-develop/01-connect/_connect_java.mdx index cd6d7c4cab9a84abb22895c704debd260884081f..635f39ceb28ffc3fd0b0d8edb057d9aa01c593de 100644 --- a/docs-cn/04-develop/01-connect/_connect_java.mdx +++ b/docs-cn/04-develop/01-connect/_connect_java.mdx @@ -1,11 +1,15 @@ ```java title="原生连接" {{#include docs-examples/java/src/main/java/com/taos/example/JNIConnectExample.java}} ``` + ```java title="REST 连接" {{#include docs-examples/java/src/main/java/com/taos/example/RESTConnectExample.java:main}} ``` -使用REST 连接时,如果查询数据量比较大,还可开启批量拉取功能。 + +使用 REST 连接时,如果查询数据量比较大,还可开启批量拉取功能。 + ```java title="开启批量拉取功能" {4} {{#include docs-examples/java/src/main/java/com/taos/example/WSConnectExample.java:main}} ``` -更多连接参数配置,参考[Java 连接器](/reference/connector/java) \ No newline at end of file + +更多连接参数配置,参考[Java 连接器](/reference/connector/java) diff --git a/docs-cn/04-develop/01-connect/_connect_node.mdx b/docs-cn/04-develop/01-connect/_connect_node.mdx index 8a259888f87d4d441c58b9a8a9008b19273c1a58..199a6e3faa88fcb295379309a250990bf97fa973 100644 --- a/docs-cn/04-develop/01-connect/_connect_node.mdx +++ b/docs-cn/04-develop/01-connect/_connect_node.mdx @@ -1,6 +1,7 @@ ```js title="原生连接" {{#include docs-examples/node/nativeexample/connect.js}} ``` + ```js title="REST 连接" {{#include docs-examples/node/restexample/connect.js}} -``` \ No newline at end of file +``` diff --git a/docs-cn/04-develop/01-connect/_connect_python.mdx b/docs-cn/04-develop/01-connect/_connect_python.mdx index 331ec0f693601baeb28ede7b0278e67f1471c187..43e13ab56eeada9d86eae057a1ab0eafcd5247de 100644 --- a/docs-cn/04-develop/01-connect/_connect_python.mdx +++ b/docs-cn/04-develop/01-connect/_connect_python.mdx @@ -1,3 +1,3 @@ ```python title="原生连接" {{#include docs-examples/python/connect_exmaple.py}} -``` \ No newline at end of file +``` diff --git a/docs-cn/04-develop/01-connect/_connect_r.mdx b/docs-cn/04-develop/01-connect/_connect_r.mdx index a69a57f66be3672d61cb0f84f43aba123cfbd5aa..8aab6121a66b38540bf1b8ebf5b48a513282ac7a 100644 --- a/docs-cn/04-develop/01-connect/_connect_r.mdx +++ b/docs-cn/04-develop/01-connect/_connect_r.mdx @@ -1,3 +1,3 @@ ```r title="原生连接" {{#include docs-examples/R/connect_native.r:demo}} -``` \ No newline at end of file +``` diff --git a/docs-cn/04-develop/01-connect/_connect_rust.mdx b/docs-cn/04-develop/01-connect/_connect_rust.mdx index b051108452d16f207ce10b128f5de2e5f507200f..9e64724c178ba2c72e14fc9878bf9c3237bb50e7 100644 --- a/docs-cn/04-develop/01-connect/_connect_rust.mdx +++ b/docs-cn/04-develop/01-connect/_connect_rust.mdx @@ -1,6 +1,7 @@ ```rust title="原生连接/REST 连接" {{#include docs-examples/rust/nativeexample/examples/connect.rs}} ``` + :::note 对于 Rust 连接器, 连接方式的不同只体现在使用的特性不同。如果启用了 "rest" 特性,那么只有 RESTful 的实现会被编译进来。 diff --git a/docs-en/04-develop/01-connect/_connect_cs.mdx b/docs-en/04-develop/01-connect/_connect_cs.mdx index 43fb50cac9cfebdcb363e75aca020c0e70f36420..52ea2d437123a26bd87e6f3fdc05a17141f9f835 100644 --- a/docs-en/04-develop/01-connect/_connect_cs.mdx +++ b/docs-en/04-develop/01-connect/_connect_cs.mdx @@ -1,7 +1,8 @@ ```csharp title="Native Connection" {{#include docs-examples/csharp/ConnectExample.cs}} ``` + :::info C# connector supports only native connection for now. -::: \ No newline at end of file +::: diff --git a/docs-en/04-develop/01-connect/_connect_go.mdx b/docs-en/04-develop/01-connect/_connect_go.mdx index 314e68314717e80da8af4fa802f8cf478185d307..1dd5d67e3533bba21960269e49e3d843b026efc8 100644 --- a/docs-en/04-develop/01-connect/_connect_go.mdx +++ b/docs-en/04-develop/01-connect/_connect_go.mdx @@ -1,15 +1,17 @@ #### Unified Database Access Interface + ```go title="Native Connection" {{#include docs-examples/go/connect/cgoexample/main.go}} ``` + ```go title="REST Connection" {{#include docs-examples/go/connect/restexample/main.go}} ``` + #### Advanced Features + The af package of driver-go can also be used to establish connection, with this way some advanced features of TDengine, like parameter binding and subscription, can be used. ```go title="Establish native connection using af package" {{#include docs-examples/go/connect/afconn/main.go}} ``` - - diff --git a/docs-en/04-develop/01-connect/_connect_java.mdx b/docs-en/04-develop/01-connect/_connect_java.mdx index f0544ed6f4d2a7c2a34174910f22f3a5cbbe9ebd..1c3e9326bf2ae597ffba683250dd43986e670469 100644 --- a/docs-en/04-develop/01-connect/_connect_java.mdx +++ b/docs-en/04-develop/01-connect/_connect_java.mdx @@ -1,12 +1,15 @@ ```java title="Native Connection" {{#include docs-examples/java/src/main/java/com/taos/example/JNIConnectExample.java}} ``` + ```java title="REST Connection" {{#include docs-examples/java/src/main/java/com/taos/example/RESTConnectExample.java:main}} ``` + When using REST connection, the feature of bulk pulling can be enabled if the size of resulting data set is huge. ```java title="Enable Bulk Pulling" {4} {{#include docs-examples/java/src/main/java/com/taos/example/WSConnectExample.java:main}} ``` -More configuration about connection,please refer to [Java Connector](/reference/connector/java) \ No newline at end of file + +More configuration about connection,please refer to [Java Connector](/reference/connector/java) diff --git a/docs-en/04-develop/01-connect/_connect_node.mdx b/docs-en/04-develop/01-connect/_connect_node.mdx index 9c0e5b0be1dc7f289832fba9bb1c6cae9ad4694f..489b0386e991ee1e8ddd173205637b75ae5a0c95 100644 --- a/docs-en/04-develop/01-connect/_connect_node.mdx +++ b/docs-en/04-develop/01-connect/_connect_node.mdx @@ -1,6 +1,7 @@ ```js title="Native Connection" {{#include docs-examples/node/nativeexample/connect.js}} ``` + ```js title="REST Connection" {{#include docs-examples/node/restexample/connect.js}} -``` \ No newline at end of file +``` diff --git a/docs-en/04-develop/01-connect/_connect_python.mdx b/docs-en/04-develop/01-connect/_connect_python.mdx index 02354057726a45cee816128e64dcc23f1189aa3c..f6c8bcfee1d92fae2d1ad320002b805dd9951228 100644 --- a/docs-en/04-develop/01-connect/_connect_python.mdx +++ b/docs-en/04-develop/01-connect/_connect_python.mdx @@ -1,3 +1,3 @@ ```python title="Native Connection" {{#include docs-examples/python/connect_exmaple.py}} -``` \ No newline at end of file +``` diff --git a/docs-en/04-develop/01-connect/_connect_r.mdx b/docs-en/04-develop/01-connect/_connect_r.mdx index 0f6e6cc18e37591d221df011b676994ef7c9b568..09c3d71ac35b1134d3089247daea9a13db4129e2 100644 --- a/docs-en/04-develop/01-connect/_connect_r.mdx +++ b/docs-en/04-develop/01-connect/_connect_r.mdx @@ -1,3 +1,3 @@ ```r title="Native Connection" {{#include docs-examples/R/connect_native.r:demo}} -``` \ No newline at end of file +``` diff --git a/docs-en/04-develop/01-connect/_connect_rust.mdx b/docs-en/04-develop/01-connect/_connect_rust.mdx index 0165114d2aec7cb080a762a92ee2158852897b63..aa19f58de6c9bab69df0663e5369402ab1a8f899 100644 --- a/docs-en/04-develop/01-connect/_connect_rust.mdx +++ b/docs-en/04-develop/01-connect/_connect_rust.mdx @@ -1,6 +1,7 @@ ```rust title="Native Connection/REST Connection" {{#include docs-examples/rust/nativeexample/examples/connect.rs}} ``` + :::note For Rust connector, the connection depends on the feature being used. If "rest" feature is enabled, then only the implementation for "rest" is compiled and packaged.