未验证 提交 0305799a 编写于 作者: weixin_47267244's avatar weixin_47267244 提交者: GitHub

Update doc (#9193)

上级 eb964500
...@@ -160,7 +160,7 @@ C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine ...@@ -160,7 +160,7 @@ C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine
* 在编译时需要链接TDengine动态库。Linux 为 *libtaos.so* ,安装后,位于 _/usr/local/taos/driver_。Windows为 taos.dll,安装后位于 *C:\TDengine* * 在编译时需要链接TDengine动态库。Linux 为 *libtaos.so* ,安装后,位于 _/usr/local/taos/driver_。Windows为 taos.dll,安装后位于 *C:\TDengine*
* 如未特别说明,当API的返回值是整数时,_0_ 代表成功,其它是代表失败原因的错误码,当返回值是指针时, _NULL_ 表示失败。 * 如未特别说明,当API的返回值是整数时,_0_ 代表成功,其它是代表失败原因的错误码,当返回值是指针时, _NULL_ 表示失败。
* 在 taoserror.h中有所有的错误码,以及对应的原因描述。 * 在 taoserror.h中有所有的错误码,以及对应的原因描述。`tstrerror(errno)` 可以获取错误码对应的错误信息。
### 示例程序 ### 示例程序
...@@ -192,6 +192,8 @@ C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine ...@@ -192,6 +192,8 @@ C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine
设置客户端选项,目前支持区域设置(`TSDB_OPTION_LOCALE`)、字符集设置(`TSDB_OPTION_CHARSET`)、时区设置(`TSDB_OPTION_TIMEZONE`)、配置文件路径设置(`TSDB_OPTION_CONFIGDIR`)。区域设置、字符集、时区默认为操作系统当前设置。 设置客户端选项,目前支持区域设置(`TSDB_OPTION_LOCALE`)、字符集设置(`TSDB_OPTION_CHARSET`)、时区设置(`TSDB_OPTION_TIMEZONE`)、配置文件路径设置(`TSDB_OPTION_CONFIGDIR`)。区域设置、字符集、时区默认为操作系统当前设置。
返回值为 `0` 表示成功,`-1` 表示失败。
- `char *taos_get_client_info()` - `char *taos_get_client_info()`
获取客户端版本信息。 获取客户端版本信息。
...@@ -218,6 +220,8 @@ C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine ...@@ -218,6 +220,8 @@ C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine
将当前的缺省数据库设置为`db` 将当前的缺省数据库设置为`db`
返回值为错误码。
- `void taos_close(TAOS *taos)` - `void taos_close(TAOS *taos)`
关闭连接,其中`taos``taos_connect`函数返回的指针。 关闭连接,其中`taos``taos_connect`函数返回的指针。
......
...@@ -185,6 +185,8 @@ Clean up the running environment and call this API before the application exits. ...@@ -185,6 +185,8 @@ Clean up the running environment and call this API before the application exits.
Set client options, currently only time zone setting (_TSDB_OPTIONTIMEZONE) and encoding setting (_TSDB_OPTIONLOCALE) are supported. The time zone and encoding default to the current operating system settings. Set client options, currently only time zone setting (_TSDB_OPTIONTIMEZONE) and encoding setting (_TSDB_OPTIONLOCALE) are supported. The time zone and encoding default to the current operating system settings.
When the return value is `0`, it means success, and when it is `-1`, it means failure.
- `char *taos_get_client_info()` - `char *taos_get_client_info()`
Get version information of the client. Get version information of the client.
...@@ -211,6 +213,8 @@ Get version information of the server-side. ...@@ -211,6 +213,8 @@ Get version information of the server-side.
Set the current default database to db. Set the current default database to db.
The return value is the error code.
- `void taos_close(TAOS *taos)` - `void taos_close(TAOS *taos)`
Close the connection, where `taos` is the pointer returned by `taos_connect` function. Close the connection, where `taos` is the pointer returned by `taos_connect` function.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册