diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 9f86d780d35476fdcd1ab7be9ccb462dd81e7396..37264e8eaa6b22444af893f12205d85dec8ad795 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -2,19 +2,21 @@ #include #include #include + #include "os.h" #include "osString.h" #include "ttype.h" #include "tmd5.h" #include "tstrbuild.h" #include "tname.h" -#include "taos.h" -#include "tsclient.h" -#include "tscLog.h" #include "hash.h" #include "tskiplist.h" + #include "tscUtil.h" +#include "tsclient.h" +#include "tscLog.h" +#include "taos.h" typedef struct { char sTableName[TSDB_TABLE_NAME_LEN]; SHashObj* tagHash; @@ -1137,7 +1139,7 @@ void destroySmlDataPoint(TAOS_SML_DATA_POINT* point) { free(point->childTableName); } -int taos_insert_by_lines(TAOS* taos, char* lines[], int numLines) { +int taos_insert_lines(TAOS* taos, char* lines[], int numLines) { SArray* lpPoints = taosArrayInit(numLines, sizeof(SLPPoint)); tscParseLines(lines, numLines, lpPoints, NULL); diff --git a/src/inc/taos.h b/src/inc/taos.h index ca18c4fb93fdcced6bcd97b499afdfd5e74f479d..a62f38792499994ebb54567c43ecddec829de368 100644 --- a/src/inc/taos.h +++ b/src/inc/taos.h @@ -169,7 +169,7 @@ DLL_EXPORT void taos_close_stream(TAOS_STREAM *tstr); DLL_EXPORT int taos_load_table_info(TAOS *taos, const char* tableNameList); -DLL_EXPORT int taos_insert_by_lines(TAOS* taos, char* lines[], int numLines); +DLL_EXPORT int taos_insert_lines(TAOS* taos, char* lines[], int numLines); #ifdef __cplusplus } diff --git a/tests/examples/c/apitest.c b/tests/examples/c/apitest.c index ed76e7b2b020ba1eef6e9ce6c08d5d2dae68267b..a377bbc7b47e1a58d4b3294b88386a9c4fb74e47 100644 --- a/tests/examples/c/apitest.c +++ b/tests/examples/c/apitest.c @@ -975,9 +975,9 @@ int32_t verify_schema_less(TAOS* taos) { "stf,t1=4i,t3=\"t4\",t2=5,t4=5 c1=3i,c3=L\"passitagin_stf\",c2=false,c5=5,c6=7u 1626006933641a" }; -// int code = taos_insert_by_lines(taos, lines , sizeof(lines)/sizeof(char*)); - int code = taos_insert_by_lines(taos, &lines[0], 1); - code = taos_insert_by_lines(taos, &lines[1], 1); +// int code = taos_insert_lines(taos, lines , sizeof(lines)/sizeof(char*)); + int code = taos_insert_lines(taos, &lines[0], 1); + code = taos_insert_lines(taos, &lines[1], 1); return code; } diff --git a/tests/tsim/src/simExe.c b/tests/tsim/src/simExe.c index 2615448e4b098612dbbe2d4b82257692c968675f..a05f46ce0de54628f289c937e959ccc3337e00a9 100644 --- a/tests/tsim/src/simExe.c +++ b/tests/tsim/src/simExe.c @@ -1079,7 +1079,7 @@ bool simExecuteLineInsertCmd(SScript *script, char *rest) { simInfo("script:%s, %s", script->fileName, rest); simLogSql(buf, true); char * lines[] = {rest}; - int32_t ret = taos_insert_by_lines(script->taos, lines, 1); + int32_t ret = taos_insert_lines(script->taos, lines, 1); if (ret == TSDB_CODE_SUCCESS) { simDebug("script:%s, taos:%p, %s executed. success.", script->fileName, script->taos, rest); script->linePos++; @@ -1102,7 +1102,7 @@ bool simExecuteLineInsertErrorCmd(SScript *script, char *rest) { simInfo("script:%s, %s", script->fileName, rest); simLogSql(buf, true); char * lines[] = {rest}; - int32_t ret = taos_insert_by_lines(script->taos, lines, 1); + int32_t ret = taos_insert_lines(script->taos, lines, 1); if (ret == TSDB_CODE_SUCCESS) { sprintf(script->error, "script:%s, taos:%p, %s executed. expect failed, but success.", script->fileName, script->taos, rest); script->linePos++;