package com.database_util;
|
|
import java.sql.SQLException;
|
import java.util.Date;
|
|
import com.base.Com;
|
import com.sql.MysqlConnPool;
|
import com.sql.Sql_Mysql;
|
|
public class DB_Batt_History {
|
|
public static void init(MysqlConnPool pool, boolean recreate) {
|
System.out.println(" db_batt_history init start at " + Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms));
|
|
createDB_BATT_HISTORY(pool);
|
|
|
System.out.println(" db_batt_testdata init end at " + Com.getDateTimeFormat(new Date(), Com.DTF_YMDhms));
|
|
}
|
|
/**
|
* ´´½¨ db_batt_history Êý¾Ý¿â
|
* @param pool
|
*/
|
public static void createDB_BATT_HISTORY(MysqlConnPool pool) {
|
Sql_Mysql sql = new Sql_Mysql(pool.getConn());
|
try {
|
sql.sqlMysqlExecute("CREATE DATABASE IF NOT EXISTS " + Sql_Mysql.DB_BATT_HISTORY);
|
} catch (SQLException e) {
|
e.printStackTrace();
|
} finally {
|
sql.close_con();
|
}
|
}
|
}
|