'修改qtask相关'
This commit is contained in:
@@ -9,6 +9,7 @@ public class DbKit implements DbSource{
|
||||
|
||||
private DbAccount dbAccount;
|
||||
private DbSource dbSource;
|
||||
private String catalog;
|
||||
|
||||
public DbKit(DbAccount dbAccount) {
|
||||
this.dbAccount = dbAccount;
|
||||
@@ -18,6 +19,15 @@ public class DbKit implements DbSource{
|
||||
throw new IllegalArgumentException(String.format("创建DbKit失败:数据库类型[cate:%s]未知", dbAccount.getCate()));
|
||||
}
|
||||
}
|
||||
public DbKit(DbAccount dbAccount, String catalog) {
|
||||
this.dbAccount = dbAccount;
|
||||
this.catalog = catalog;
|
||||
if ("mysql".equalsIgnoreCase(dbAccount.getCate())) {
|
||||
dbSource = new DbSourceMysql(dbAccount, catalog);
|
||||
} else {
|
||||
throw new IllegalArgumentException(String.format("创建DbKit失败:数据库类型[cate:%s]未知", dbAccount.getCate()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user