From 78e4aa36c34af404b04e852921bef3fcb76cd48e Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 18 Aug 2023 00:19:51 +0800 Subject: [PATCH] docs: fix taos_init() return type (#22475) --- docs/en/14-reference/03-connector/03-cpp.mdx | 4 ++-- docs/zh/08-connector/10-cpp.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/14-reference/03-connector/03-cpp.mdx b/docs/en/14-reference/03-connector/03-cpp.mdx index 8874398c76..3e1a0f9545 100644 --- a/docs/en/14-reference/03-connector/03-cpp.mdx +++ b/docs/en/14-reference/03-connector/03-cpp.mdx @@ -135,7 +135,7 @@ The following describes the basic API, synchronous API, asynchronous API, subscr The base API is used to do things like create database connections and provide a runtime environment for the execution of other APIs. -- `void taos_init()` +- `int taos_init()` Initializes the runtime environment. If the API is not actively called, the driver will automatically call the API when `taos_connect()` is called, so the program generally does not need to call it manually. @@ -514,4 +514,4 @@ In addition to writing data using the SQL method or the parameter binding API, w - topics: a list of topics subscribed by consumers,need to be freed by tmq_list_destroy **Return value** - - zero success,none zero failed, wrong message can be obtained through `char *tmq_err2str(int32_t code)` \ No newline at end of file + - zero success,none zero failed, wrong message can be obtained through `char *tmq_err2str(int32_t code)` diff --git a/docs/zh/08-connector/10-cpp.mdx b/docs/zh/08-connector/10-cpp.mdx index e2cd9005bd..12bbffa4f9 100644 --- a/docs/zh/08-connector/10-cpp.mdx +++ b/docs/zh/08-connector/10-cpp.mdx @@ -223,7 +223,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) 基础 API 用于完成创建数据库连接等工作,为其它 API 的执行提供运行时环境。 -- `void taos_init()` +- `int taos_init()` 初始化运行环境。如果没有主动调用该 API,那么调用 `taos_connect()` 时驱动将自动调用该 API,故程序一般无需手动调用。 @@ -602,4 +602,4 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多 - topics: 获取的 topic 列表存储在这个结构中,接口内分配内存,需调用tmq_list_destroy释放 **返回值** - - 错误码,0成功,非0失败,可通过 `char *tmq_err2str(int32_t code)` 函数获取错误信息 \ No newline at end of file + - 错误码,0成功,非0失败,可通过 `char *tmq_err2str(int32_t code)` 函数获取错误信息