File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
console/atest-ui/src/views Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,18 @@ const tablesTree = ref([] as TreeItem[])
4848const storeChangedEvent = (s : string ) => {
4949 kind .value = ' '
5050 SetDataManagerPreference (' currentStore' , s )
51+ queryDataMeta .value .currentDatabase = " "
5152 stores .value .forEach ((e : Store ) => {
5253 if (e .name === s ) {
5354 kind .value = e .kind .name
5455 switch (GetDriverName (e )){
5556 case Driver .MySQL :
5657 sqlConfig .value .dialect = MySQL
58+ e .properties .forEach ((p : Pair ) => {
59+ if (p .key === ' database' ) {
60+ queryDataMeta .value .currentDatabase = p .value
61+ }
62+ })
5763 break ;
5864 case Driver .Postgres :
5965 sqlConfig .value .dialect = PostgreSQL
@@ -64,6 +70,18 @@ const storeChangedEvent = (s: string) => {
6470 default :
6571 sqlConfig .value .dialect = StandardSQL
6672 }
73+
74+ switch (GetDriverName (e )){
75+ case Driver .MySQL :
76+ case Driver .Postgres :
77+ case Driver .TDengine :
78+ e .properties .forEach ((p : Pair ) => {
79+ if (p .key === ' database' ) {
80+ queryDataMeta .value .currentDatabase = p .value
81+ }
82+ })
83+ break ;
84+ }
6785 return
6886 }
6987 })
@@ -79,7 +97,6 @@ const storeChangedEvent = (s: string) => {
7997 complexEditor .value = true
8098 }
8199
82- queryDataMeta .value .currentDatabase = GetDataManagerPreference ().currentDatabase
83100 executeQuery ()
84101}
85102watch (store , storeChangedEvent )
You can’t perform that action at this time.
0 commit comments