|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { DATA_BASE_TYPES, DATA_BASE_TYPES_OTHER } from '@constants/constant'; |
|
|
|
|
import { DATA_BASE_TYPES, DATA_BASE_TYPES_OTHER, DESIGN_DRIVER_TYPE } from '@constants/constant'; |
|
|
|
|
import { CONSTANT_PLUGIN_TYPES, CONSTANT_PLUGIN_SHOW, CONSTANT_PLUGIN_EDIT } from '@constants/plugin'; |
|
|
|
|
import { DatabaseType } from './app.typings'; |
|
|
|
|
import { Connection } from './crud/crud.typings'; |
|
|
|
@ -29,13 +29,8 @@ export function getJdbcDatabaseType(database: string, driver: string): DatabaseT
|
|
|
|
|
if (database && DATA_BASE_TYPES.some(item => item.databaseType === database)) { |
|
|
|
|
databaseType = DATA_BASE_TYPES.find(item => item.databaseType === database); |
|
|
|
|
} else { |
|
|
|
|
databaseType = (DATA_BASE_TYPES as DatabaseType[]).find(item => { |
|
|
|
|
if (item.drivers) { |
|
|
|
|
return item.drivers.includes(driver); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return item.driver === driver; |
|
|
|
|
}); |
|
|
|
|
const desingDatabase = DESIGN_DRIVER_TYPE.find(item => item.driver === driver); |
|
|
|
|
databaseType = DATA_BASE_TYPES.find(item => item.databaseType === BI.get(desingDatabase, 'type')); |
|
|
|
|
} |
|
|
|
|
if (!databaseType) { |
|
|
|
|
return DATA_BASE_TYPES_OTHER; |
|
|
|
|