|
|
|
@ -2,6 +2,7 @@ import type { OracleUi, ProjectType, TableType } from 'nocodb-sdk'
|
|
|
|
|
import { SqlUiFactory } from 'nocodb-sdk' |
|
|
|
|
import { isString } from '@vueuse/core' |
|
|
|
|
import { |
|
|
|
|
ClientType, |
|
|
|
|
computed, |
|
|
|
|
createEventHook, |
|
|
|
|
ref, |
|
|
|
@ -54,13 +55,13 @@ const [setup, use] = useInjectionState(() => {
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const projectBaseType = $computed(() => project.value?.bases?.[0]?.type || '') |
|
|
|
|
const projectBaseType = $computed(() => project.value?.bases?.[0]?.type || ClientType.MYSQL) |
|
|
|
|
|
|
|
|
|
const sqlUi = computed( |
|
|
|
|
() => SqlUiFactory.create({ client: projectBaseType }) as Exclude<ReturnType<typeof SqlUiFactory['create']>, typeof OracleUi>, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
const isMysql = computed(() => ['mysql', 'mysql2'].includes(projectBaseType)) |
|
|
|
|
const isMysql = computed(() => ['mysql', ClientType.MYSQL].includes(projectBaseType)) |
|
|
|
|
const isMssql = computed(() => projectBaseType === 'mssql') |
|
|
|
|
const isPg = computed(() => projectBaseType === 'pg') |
|
|
|
|
const isSharedBase = computed(() => projectType === 'base') |
|
|
|
|