Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion console/atest-ui/src/views/DataManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ const tablesTree = ref([] as TreeItem[])
const storeChangedEvent = (s: string) => {
kind.value = ''
SetDataManagerPreference('currentStore', s)
queryDataMeta.value.currentDatabase = ""
stores.value.forEach((e: Store) => {
if (e.name === s) {
kind.value = e.kind.name
switch (GetDriverName(e)){
case Driver.MySQL:
sqlConfig.value.dialect = MySQL
e.properties.forEach((p: Pair) => {
if (p.key === 'database') {
queryDataMeta.value.currentDatabase = p.value
}
})
break;
case Driver.Postgres:
sqlConfig.value.dialect = PostgreSQL
Expand All @@ -64,6 +70,18 @@ const storeChangedEvent = (s: string) => {
default:
sqlConfig.value.dialect = StandardSQL
}

switch (GetDriverName(e)){
case Driver.MySQL:
case Driver.Postgres:
case Driver.TDengine:
e.properties.forEach((p: Pair) => {
if (p.key === 'database') {
queryDataMeta.value.currentDatabase = p.value
}
})
break;
}
return
}
})
Expand All @@ -79,7 +97,6 @@ const storeChangedEvent = (s: string) => {
complexEditor.value = true
}

queryDataMeta.value.currentDatabase = GetDataManagerPreference().currentDatabase
executeQuery()
}
watch(store, storeChangedEvent)
Expand Down
Loading