Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ad767f6d
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ad767f6d
编写于
8月 23, 2021
作者:
wmmhello
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/TD-5992' of github.com:taosdata/TDengine into feature/TD-5992
上级
1f50e759
d8a3c95d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
10 deletion
+15
-10
src/client/CMakeLists.txt
src/client/CMakeLists.txt
+8
-8
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
...dbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
+2
-1
src/connector/jdbc/src/test/java/com/taosdata/jdbc/SetConfigurationInJNITest.java
...est/java/com/taosdata/jdbc/SetConfigurationInJNITest.java
+5
-1
未找到文件。
src/client/CMakeLists.txt
浏览文件 @
ad767f6d
...
...
@@ -18,9 +18,9 @@ IF (TD_LINUX)
# generate dynamic library (*.so)
ADD_LIBRARY
(
taos SHARED
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taos common query trpc tutil pthread m rt
)
TARGET_LINK_LIBRARIES
(
taos common query trpc
cJson
tutil pthread m rt
)
IF
(
TD_LINUX_64
)
TARGET_LINK_LIBRARIES
(
taos lua
)
TARGET_LINK_LIBRARIES
(
taos lua
cJson
)
ENDIF
()
SET_TARGET_PROPERTIES
(
taos PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
...
...
@@ -39,13 +39,13 @@ ELSEIF (TD_DARWIN)
# set the static lib name
ADD_LIBRARY
(
taos_static STATIC
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taos_static common query trpc tutil pthread m lua cJson
)
TARGET_LINK_LIBRARIES
(
taos_static common query trpc
cJson
tutil pthread m lua cJson
)
SET_TARGET_PROPERTIES
(
taos_static PROPERTIES OUTPUT_NAME
"taos_static"
)
SET_TARGET_PROPERTIES
(
taos_static PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
# generate dynamic library (*.dylib)
ADD_LIBRARY
(
taos SHARED
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taos common query trpc tutil pthread m lua
)
TARGET_LINK_LIBRARIES
(
taos common query
cJson
trpc tutil pthread m lua
)
SET_TARGET_PROPERTIES
(
taos PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
#set version of .dylib
...
...
@@ -64,14 +64,14 @@ ELSEIF (TD_WINDOWS)
CONFIGURE_FILE
(
"
${
TD_COMMUNITY_DIR
}
/src/client/src/taos.rc.in"
"
${
TD_COMMUNITY_DIR
}
/src/client/src/taos.rc"
)
ADD_LIBRARY
(
taos_static STATIC
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taos_static trpc tutil cJson query
)
TARGET_LINK_LIBRARIES
(
taos_static trpc
cJson
tutil cJson query
)
# generate dynamic library (*.dll)
ADD_LIBRARY
(
taos SHARED
${
SRC
}
${
TD_COMMUNITY_DIR
}
/src/client/src/taos.rc
)
IF
(
NOT TD_GODLL
)
SET_TARGET_PROPERTIES
(
taos PROPERTIES LINK_FLAGS /DEF:
${
TD_COMMUNITY_DIR
}
/src/client/src/taos.def
)
ENDIF
()
TARGET_LINK_LIBRARIES
(
taos trpc tutil query lua
)
TARGET_LINK_LIBRARIES
(
taos trpc
cJson
tutil query lua
)
ELSEIF
(
TD_DARWIN
)
SET
(
CMAKE_MACOSX_RPATH 1
)
...
...
@@ -79,12 +79,12 @@ ELSEIF (TD_DARWIN)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/deps/cJson/inc
)
ADD_LIBRARY
(
taos_static STATIC
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taos_static query trpc tutil pthread cJson m lua
)
TARGET_LINK_LIBRARIES
(
taos_static query trpc
cJson
tutil pthread cJson m lua
)
SET_TARGET_PROPERTIES
(
taos_static PROPERTIES OUTPUT_NAME
"taos_static"
)
# generate dynamic library (*.dylib)
ADD_LIBRARY
(
taos SHARED
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taos query trpc tutil pthread m lua
)
TARGET_LINK_LIBRARIES
(
taos query trpc
cJson
tutil pthread m lua
)
SET_TARGET_PROPERTIES
(
taos PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
浏览文件 @
ad767f6d
...
...
@@ -63,6 +63,8 @@ public class TSDBJNIConnector {
public
static
native
String
getTsCharset
();
public
static
native
int
setConfig
(
String
config
);
public
boolean
connect
(
String
host
,
int
port
,
String
dbName
,
String
user
,
String
password
)
throws
SQLException
{
if
(
this
.
taos
!=
TSDBConstants
.
JNI_NULL_POINTER
)
{
closeConnection
();
...
...
@@ -358,6 +360,5 @@ public class TSDBJNIConnector {
private
native
int
insertLinesImp
(
String
[]
lines
,
long
conn
);
private
native
int
setConfig
(
String
config
);
}
src/connector/jdbc/src/test/java/com/taosdata/jdbc/SetConfigurationInJNITest.java
浏览文件 @
ad767f6d
...
...
@@ -19,13 +19,17 @@ public class SetConfigurationInJNITest {
@Test
public
void
testDebugFlag
()
{
try
{
// init
TSDBJNIConnector
.
initImp
(
null
);
TSDBJNIConnector
.
setOptions
(
0
,
null
);
TSDBJNIConnector
.
setOptions
(
1
,
null
);
TSDBJNIConnector
.
setOptions
(
2
,
null
);
String
tsCharset
=
TSDBJNIConnector
.
getTsCharset
();
System
.
out
.
println
(
tsCharset
);
assertEquals
(
""
,
tsCharset
);
TSDBJNIConnector
.
setConfig
(
debugFlagJSON
);
// connect
TSDBJNIConnector
jniConnector
=
new
TSDBJNIConnector
();
boolean
connected
=
jniConnector
.
connect
(
host
,
0
,
null
,
"root"
,
"taosdata"
);
assertTrue
(
connected
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录