diff --git a/README-CN.md b/README-CN.md index 43d3c76a73..bea4bc9fe6 100644 --- a/README-CN.md +++ b/README-CN.md @@ -80,7 +80,7 @@ TDengine 目前可以在 Linux、 Windows、macOS 等平台上安装和运行。 ### Ubuntu 18.04、20.04、22.04 ```bash -sudo apt-get udpate +sudo apt-get update sudo apt-get install -y gcc cmake build-essential git libjansson-dev \ libsnappy-dev liblzma-dev zlib1g-dev pkg-config ``` diff --git a/docs/en/14-reference/05-connector/10-cpp.md b/docs/en/14-reference/05-connector/10-cpp.md index edccd8ebd4..52c64e1209 100644 --- a/docs/en/14-reference/05-connector/10-cpp.md +++ b/docs/en/14-reference/05-connector/10-cpp.md @@ -1121,10 +1121,14 @@ In addition to using SQL or parameter binding APIs to insert data, you can also - conf: [Input] Pointer to a valid tmq_conf_t structure, representing a TMQ configuration object. - key: [Input] Configuration item key name. - value: [Input] Configuration item value. - - **Return Value**: Returns a tmq_conf_res_t enum value, indicating the result of the configuration setting. - - TMQ_CONF_OK: Successfully set the configuration item. - - TMQ_CONF_INVALID_KEY: Invalid key value. - - TMQ_CONF_UNKNOWN: Invalid key name. + - **Return Value**: Returns a tmq_conf_res_t enum value, indicating the result of the configuration setting. tmq_conf_res_t defined as follows: + ``` + typedef enum tmq_conf_res_t { + TMQ_CONF_UNKNOWN = -2, // invalid key + TMQ_CONF_INVALID = -1, // invalid value + TMQ_CONF_OK = 0, // success + } tmq_conf_res_t; + ``` - `void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param)` - **Interface Description**: Sets the auto-commit callback function in the TMQ configuration object. diff --git a/docs/zh/14-reference/05-connector/10-cpp.mdx b/docs/zh/14-reference/05-connector/10-cpp.mdx index 3f36fb9e91..2f8431cc46 100644 --- a/docs/zh/14-reference/05-connector/10-cpp.mdx +++ b/docs/zh/14-reference/05-connector/10-cpp.mdx @@ -1115,10 +1115,14 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多 - conf:[入参] 指向一个有效的 tmq_conf_t 结构体指针,该结构体代表一个 TMQ 配置对象。 - key:[入参] 数配置项的键名。 - value:[入参] 配置项的值。 - - **返回值**:返回一个 tmq_conf_res_t 枚举值,表示配置设置的结果。 - - TMQ_CONF_OK:成功设置配置项。 - - TMQ_CONF_INVALID_KEY:键值无效。 - - TMQ_CONF_UNKNOWN:键名无效。 + - **返回值**:返回一个 tmq_conf_res_t 枚举值,表示配置设置的结果。tmq_conf_res_t 定义如下: + ``` + typedef enum tmq_conf_res_t { + TMQ_CONF_UNKNOWN = -2, // 键名无效 + TMQ_CONF_INVALID = -1, // 键值无效 + TMQ_CONF_OK = 0, // 成功设置配置项 + } tmq_conf_res_t; + ``` - `void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param)` - **接口说明**:设置 TMQ 配置对象中的自动提交回调函数。