Stringsql="create database if not exists "+config.getDbName()+" keep "+config.getKeep()+" days "+config.getDays();
execute(sql);
}
privatevoiddropDatabase(){
Stringsql="drop database if exists "+config.getDbName();
execute(sql);
}
/**
* use database
*/
privatevoiduseDatabase(){
Stringsql="use "+config.getDbName();
execute(sql);
}
privatevoidcreateSuperTable(){
Stringsql="create table if not exists "+config.getStbName()+"(ts timestamp, current float, voltage int, phase float) tags(location binary(64), groupId int)";