From 84ca09f2cf1ffa73aace16e40b77d9dcc7f0558a Mon Sep 17 00:00:00 2001 From: Elias Soong Date: Tue, 8 Jun 2021 11:13:37 +0800 Subject: [PATCH 1/4] [TD-4484] : add func errstr() for stmt APIs. --- documentation20/cn/08.connector/docs.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/documentation20/cn/08.connector/docs.md b/documentation20/cn/08.connector/docs.md index b6125e3cfe..8c22d50185 100644 --- a/documentation20/cn/08.connector/docs.md +++ b/documentation20/cn/08.connector/docs.md @@ -307,6 +307,8 @@ TDengine的异步API均采用非阻塞调用模式。应用程序可以用多线 8. 调用 `taos_stmt_execute` 执行已经准备好的批处理指令; 9. 执行完毕,调用 `taos_stmt_close` 释放所有资源。 +说明:如果 `taos_stmt_execute` 执行成功,假如不需要改变 SQL 语句的话,那么是可以复用 `taos_stmt_prepare` 的解析结果,直接进行第 3~6 步绑定新数据的。但如果执行出错,那么并不建议继续在当前的环境上下文下继续工作,而是建议释放资源,然后从 `taos_stmt_init` 步骤重新开始。 + 除 C/C++ 语言外,TDengine 的 Java 语言 JNI Connector 也提供参数绑定接口支持,具体请另外参见:[参数绑定接口的 Java 用法](https://www.taosdata.com/cn/documentation/connector/java#stmt-java)。 接口相关的具体函数如下(也可以参考 [apitest.c](https://github.com/taosdata/TDengine/blob/develop/tests/examples/c/apitest.c) 文件中使用对应函数的方式): @@ -378,6 +380,11 @@ typedef struct TAOS_MULTI_BIND { 执行完毕,释放所有资源。 +- `char * taos_stmt_errstr(TAOS_STMT *stmt)` + + (2.1.3.0 版本新增) + 用于在其他 stmt API 返回错误(返回错误码或空指针)时获取错误信息。 + ### 连续查询接口 TDengine提供时间驱动的实时流式计算API。可以每隔一指定的时间段,对一张或多张数据库的表(数据流)进行各种实时聚合计算操作。操作简单,仅有打开、关闭流的API。具体如下: From e55cbcfe2854807fbff5a53f3a25111011539462 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 11:39:52 +0800 Subject: [PATCH 2/4] Bump logback-core in /tests/comparisonTest/opentsdb/opentsdbtest (#6403) Bumps logback-core from 1.0.13 to 1.2.0. --- updated-dependencies: - dependency-name: ch.qos.logback:logback-core dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tests/comparisonTest/opentsdb/opentsdbtest/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml b/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml index 29c2a90f10..0ba23f2e79 100644 --- a/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml +++ b/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml @@ -216,7 +216,7 @@ ch.qos.logback logback-core - 1.0.13 + 1.2.0 From dd5c64cb394710e07aa294020b4c65ae10067146 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 11:40:23 +0800 Subject: [PATCH 3/4] Bump logback-classic in /tests/comparisonTest/opentsdb/opentsdbtest (#6404) Bumps logback-classic from 1.0.13 to 1.2.0. --- updated-dependencies: - dependency-name: ch.qos.logback:logback-classic dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tests/comparisonTest/opentsdb/opentsdbtest/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml b/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml index 0ba23f2e79..e0ada8b763 100644 --- a/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml +++ b/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml @@ -222,7 +222,7 @@ ch.qos.logback logback-classic - 1.0.13 + 1.2.0 From 096fadd75eb44b217b6a8c0a3ff2436a39a94485 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 8 Jun 2021 11:40:45 +0800 Subject: [PATCH 4/4] [TD-4605]: early version visual studio compile. (#6400) --- src/kit/taosdemo/taosdemo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 6f5d407a73..b669c75b45 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -625,6 +625,10 @@ static int64_t g_totalChildTables = 0; static SQueryMetaInfo g_queryInfo; static FILE * g_fpOfInsertResult = NULL; +#if _MSC_VER <= 1900 +#define __func__ __FUNCTION__ +#endif + #define debugPrint(fmt, ...) \ do { if (g_args.debug_print || g_args.verbose_print) \ fprintf(stderr, "DEBG: "fmt, __VA_ARGS__); } while(0)