|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { DATA_BASE_TYPES, DATA_BASE_TYPES_OTHER, DESIGN_DRIVER_TYPE } from '@constants/constant'; |
|
|
|
|
import { DATA_BASE_TYPES, DATA_BASE_TYPES_OTHER, DESIGN_DRIVER_TYPE, OTHER_JDBC } from '@constants/constant'; |
|
|
|
|
import { CONSTANT_PLUGIN_TYPES } from './app.constant'; |
|
|
|
|
import { DatabaseType } from './app.typings'; |
|
|
|
|
import { Connection } from './crud/crud.typings'; |
|
|
|
@ -32,7 +32,8 @@ export function getJdbcDatabaseType(database: string, driver: string): DatabaseT
|
|
|
|
|
} |
|
|
|
|
let databaseType = null; |
|
|
|
|
// 从全部数据库类型中获取jdbc类型的
|
|
|
|
|
const jdbcDatabases = getAllDatabaseTypes().filter(v => v.type === 'jdbc'); |
|
|
|
|
// 兼容之前的逻辑,otherJdbc要单独处理一下
|
|
|
|
|
const jdbcDatabases = getAllDatabaseTypes().filter(v => v.type === 'jdbc' || v.type === OTHER_JDBC); |
|
|
|
|
// KERNEL-1655 兼容旧版 由于旧版设计器创建的数据连接database都为other,所以要根据driver来判断数据类型
|
|
|
|
|
if (database && database !== 'other' && jdbcDatabases.some(item => item.databaseType === database)) { |
|
|
|
|
databaseType = jdbcDatabases.find(item => item.databaseType === database); |
|
|
|
|