提交 6b404cd1 编写于 作者: S shenglian zhou

change api function name taos_insert_by_lines to taos_insert_lines

上级 36f0b8a6
......@@ -2,19 +2,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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);
......
......@@ -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
}
......
......@@ -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;
}
......
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册