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

docs: refine reference en-docs (#12598)

* docs: reference doc in English

[TD-15603]

* docs: reference docs in English

[TD-15603]

* docs: refine reference English docs

[TD-15603]

* docs: refine reference docs

* docs: refine refince docs

* docs: refine reference doc

* docs: refine reference doc

* docs: refine reference doc

* docs: refine reference doc
上级 020c18ca
......@@ -51,12 +51,12 @@ TDengine 客户端驱动的安装请参考 [安装指南](/reference/connector#
taos_cleanup();
```
在上面的示例代码中, `taos_connect` 建立到客户端程序所在主机的 6030 端口的连接,`taos_close`关闭当前连接,`taos_cleanup`清除客户端驱动所申请和使用的资源。
在上面的示例代码中, `taos_connect()` 建立到客户端程序所在主机的 6030 端口的连接,`taos_close()`关闭当前连接,`taos_cleanup()`清除客户端驱动所申请和使用的资源。
:::note
- 如未特别说明,当 API 的返回值是整数时,_0_ 代表成功,其它是代表失败原因的错误码,当返回值是指针时, _NULL_ 表示失败。
- 所有的错误码以及对应的原因描述在 taoserror.h 文件中。
- 所有的错误码以及对应的原因描述在 `taoserror.h` 文件中。
:::
......@@ -120,8 +120,8 @@ TDengine 客户端驱动的安装请参考 [安装指南](/reference/connector#
</details>
:::info
更多示例代码及下载请见 [github](https://github.com/taosdata/TDengine/tree/develop/examples/c)
也可以在安装目录下的 examples/c 路径下找到。 该目录下有 makefile,在 Linux 环境下,直接执行 make 就可以编译得到执行文件。
更多示例代码及下载请见 [GitHub](https://github.com/taosdata/TDengine/tree/develop/examples/c)。
也可以在安装目录下的 `examples/c` 路径下找到。 该目录下有 makefile,在 Linux 环境下,直接执行 make 就可以编译得到执行文件。
**提示:**在 ARM 环境下编译时,请将 makefile 中的 `-msse4.2` 去掉,这个选项只有在 x64/x86 硬件平台上才能支持。
:::
......@@ -362,7 +362,7 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多
(2.1.3.0 版本新增)
用于在其他 STMT API 返回错误(返回错误码或空指针)时获取错误信息。
### 无模式写入 API
### 无模式(schemaless)写入 API
除了使用 SQL 方式或者使用参数绑定 API 写入数据外,还可以使用 Schemaless 的方式完成写入。Schemaless 可以免于预先创建超级表/数据子表的数据结构,而是可以直接写入数据,TDengine 系统会根据写入的数据内容自动创建和维护所需要的表结构。Schemaless 的使用方式详见 [Schemaless 写入](/reference/schemaless/) 章节,这里介绍与之配套使用的 C/C++ API。
......@@ -390,7 +390,7 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多
- TSDB_SML_TELNET_PROTOCOL: OpenTSDB Telnet 文本行协议
- TSDB_SML_JSON_PROTOCOL: OpenTSDB Json 协议格式
时间戳分辨率的定义,定义在 taos.h 文件中,具体内容如下:
时间戳分辨率的定义,定义在 `taos.h` 文件中,具体内容如下:
- TSDB_SML_TIMESTAMP_NOT_CONFIGURED = 0,
- TSDB_SML_TIMESTAMP_HOURS,
......@@ -448,3 +448,4 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多
- `void taos_unsubscribe(TAOS_SUB *tsub, int keepProgress)`
取消订阅。 如参数 `keepProgress` 不为 0,API 会保留订阅的进度信息,后续调用 `taos_subscribe()` 时可以基于此进度继续;否则将删除进度信息,后续只能重新开始读取数据。
......@@ -22,7 +22,7 @@ The dynamic libraries for the TDengine client driver are located in.
## Supported platforms
Please refer to [list of supported platforms](/reference/connector#supported platforms)
Please refer to [list of supported platforms](/reference/connector#supported-platforms)
## Supported versions
......@@ -30,7 +30,7 @@ The version number of the TDengine client driver and the version number of the T
## Installation steps
Please refer to the [Installation Guide](/reference/connector#installation steps) for TDengine client driver installation
Please refer to the [Installation Steps](/reference/connector#installation-steps) for TDengine client driver installation
## Establishing a connection
......@@ -319,17 +319,17 @@ The specific functions related to the interface are as follows (see also the [pr
- `int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name)`
(New in version 2.1.1.0, only supported for replacing parameter values in INSERT statements)
(Available in 2.1.1.0 and later versions, only supported for replacing parameter values in INSERT statements)
When the table name in the SQL command uses `? ` placeholder, you can use this function to bind a specific table name.
- `int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags)`
(New in version 2.1.2.0, only supported for replacing parameter values in INSERT statements)
(Available in 2.1.2.0 and later versions, only supported for replacing parameter values in INSERT statements)
When the table name and TAGS in the SQL command both use `? `, you can use this function to bind the specific table name and the specific TAGS value. The most typical usage scenario is an INSERT statement that uses the automatic table building function (the current version does not support specifying specific TAGS columns.) The number of columns in the TAGS parameter needs to be the same as the number of TAGS requested in the SQL command.
- `int taos_stmt_bind_param_batch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind)`
(new in version 2.1.1.0, only supported for replacing parameter values in INSERT statements)
(Available in 2.1.1.0 and later versions, only supported for replacing parameter values in INSERT statements)
To pass the data to be bound in a multi-column manner, it is necessary to ensure that the order of the data columns and the number of columns given here are the same as the VALUES parameter in the SQL statement. The specific definition of TAOS_MULTI_BIND is as follows.
```c
......@@ -361,10 +361,10 @@ The specific functions related to the interface are as follows (see also the [pr
- ` char * taos_stmt_errstr(TAOS_STMT *stmt)`
(new in version 2.1.3.0)
(Available in 2.1.3.0 and later versions)
Used to get error information if other STMT APIs return errors (return error codes or null pointers).
### Write-without-mode API
### Schemaless Writing API
In addition to writing data using the SQL method or the parameter binding API, writing can also be done using schemaless writing, which eliminates the need to create a super table/data sub-table structure in advance and writes the data directly. The TDengine system automatically creates and maintains the required table structure based on the written data content. The use of schemaless writing is described in the chapter [Schemaless Writing](/reference/schemaless/), and the C/C++ API used with it is described here.
......@@ -419,7 +419,7 @@ The Subscription API currently supports subscribing to one or more tables and co
- taos: the database connection that has been established
- restart: if the subscription already exists, whether to restart or continue the previous subscription
- topic: the topic of the subscription (i.e., the name). This parameter is the unique identifier of the subscription
- sql: the query statement of the subscription, this statement can only be `select` statement, only the original data should be queried, only the data can be queried in time order
- sql: the query statement of the subscription, this statement can only be _select_ statement, only the original data should be queried, only the data can be queried in time order
- fp: the callback function when the query result is received (the function prototype will be introduced later), only used when called asynchronously. This parameter should be passed `NULL` when called synchronously
- param: additional parameter when calling the callback function, the system API will pass it to the callback function as it is, without any processing
- interval: polling period in milliseconds. The callback function will be called periodically according to this parameter when called asynchronously. not recommended to set this parameter too small To avoid impact on system performance when called synchronously. If the interval between two calls to `taos_consume()` is less than this period, the API will block until the interval exceeds this period.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册