Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
loser646
TDengine
提交
6b404cd1
T
TDengine
项目概览
loser646
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6b404cd1
编写于
7月 14, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change api function name taos_insert_by_lines to taos_insert_lines
上级
36f0b8a6
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
12 addition
and
10 deletion
+12
-10
src/client/src/tscParseLineProtocol.c
src/client/src/tscParseLineProtocol.c
+6
-4
src/inc/taos.h
src/inc/taos.h
+1
-1
tests/examples/c/apitest.c
tests/examples/c/apitest.c
+3
-3
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+2
-2
未找到文件。
src/client/src/tscParseLineProtocol.c
浏览文件 @
6b404cd1
...
...
@@ -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
);
...
...
src/inc/taos.h
浏览文件 @
6b404cd1
...
...
@@ -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
}
...
...
tests/examples/c/apitest.c
浏览文件 @
6b404cd1
...
...
@@ -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
;
}
...
...
tests/tsim/src/simExe.c
浏览文件 @
6b404cd1
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录