refactor: 去掉废弃代码
This commit is contained in:
parent
92ca6401ba
commit
78bbdc8aea
@ -62,16 +62,10 @@ public class ProviderFactory implements ApplicationContextAware {
|
||||
public static DDLProvider getDDLProvider(String type) {
|
||||
DatasourceTypes datasourceType = DatasourceTypes.valueOf(type);
|
||||
switch (datasourceType) {
|
||||
case mysql:
|
||||
return context.getBean("mysqlDDL", DDLProvider.class);
|
||||
case doris:
|
||||
return context.getBean("dorisDDL", DDLProvider.class);
|
||||
case oracle:
|
||||
return context.getBean("oracleDDL", DDLProvider.class);
|
||||
case sqlServer:
|
||||
return context.getBean("mysqlDDL", DDLProvider.class);
|
||||
default:
|
||||
return context.getBean("mysqlDDL", DDLProvider.class);
|
||||
return context.getBean("dorisDDL", DDLProvider.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
package io.dataease.provider.mysql;
|
||||
|
||||
import io.dataease.provider.DDLProvider;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
* @Date 2021/5/17 4:27 下午
|
||||
*/
|
||||
@Service("mysqlDDL")
|
||||
public class MysqlDDLProvider extends DDLProvider {
|
||||
@Override
|
||||
public String createView(String name, String viewSQL) {
|
||||
return "CREATE VIEW IF NOT EXISTS " + name + " AS (" + viewSQL + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dropTable(String name) {
|
||||
return "DROP TABLE IF EXISTS " + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dropView(String name) {
|
||||
return "DROP VIEW IF EXISTS " + name;
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package io.dataease.provider.oracle;
|
||||
|
||||
import io.dataease.provider.DDLProvider;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
* @Date 2021/5/17 4:27 下午
|
||||
*/
|
||||
@Service("oracleDDL")
|
||||
public class OracleDDLProvider extends DDLProvider {
|
||||
@Override
|
||||
public String createView(String name, String viewSQL) {
|
||||
return "CREATE VIEW IF NOT EXISTS " + name + " AS (" + viewSQL + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dropTable(String name) {
|
||||
return "DROP TABLE IF EXISTS " + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dropView(String name) {
|
||||
return "DROP VIEW IF EXISTS " + name;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user