tdengine event子表修改TAG(device_code,device_name)
This commit is contained in:
parent
7e4ee1323f
commit
4cca0a4cc2
@ -809,7 +809,7 @@ public class TDEngineService {
|
||||
|
||||
public Boolean checkTableExist(String tableName){
|
||||
StringBuffer sb = new StringBuffer(256);
|
||||
sb.append("select count(*) from information_schema.ins_tables where table_name = '");
|
||||
sb.append("select count(*) as tablecount from information_schema.ins_tables where table_name = '");
|
||||
sb.append(tableName);
|
||||
sb.append("'");
|
||||
Integer result = null;
|
||||
@ -817,7 +817,7 @@ public class TDEngineService {
|
||||
Statement smt = conn.createStatement();
|
||||
ResultSet rs = smt.executeQuery(sb.toString())) {
|
||||
if (rs.next()) {
|
||||
result = rs.getInt("count");
|
||||
result = rs.getInt("tablecount");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("检查td表是否存在失败", e);
|
||||
|
@ -102,5 +102,5 @@ logging:
|
||||
|
||||
tdengine:
|
||||
password: taosdata
|
||||
url: jdbc:TAOS-RS://192.168.109.160:6041/das
|
||||
url: jdbc:TAOS-RS://192.168.109.187:6041/das
|
||||
username: root
|
Loading…
Reference in New Issue
Block a user