fix(oracle): 简化编辑器选择器并支持 schema 切换 (closes #205)
Oracle/Dameng 连接隐藏多余的 Database 选择器,只显示 Schema 选择器。 查询执行时通过 ALTER SESSION SET CURRENT_SCHEMA 切换 schema 上下文。
This commit is contained in:
1 parent
9413df686e
commit
d4c2b4af7b
3 files changed
+18
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { ref } from "vue";
|
||||
import { useConnectionStore } from "@/stores/connectionStore";
|
||||
import { isSchemaAware as isSchemaAwareType } from "@/lib/databaseCapabilities";
|
||||
import { isSchemaAware as isSchemaAwareType, isSingleDatabase } from "@/lib/databaseCapabilities";
|
||||
import * as api from "@/lib/api";
|
||||
|
||||
export function useSchemaOptions() {
|
||||
@@ -18,7 +18,9 @@ export function useSchemaOptions() {
|
||||
}
|
||||
|
||||
async function loadSchemaOptions(connectionId: string, database: string) {
|
||||
if (!isSchemaAware(connectionId) || !database) return;
|
||||
if (!isSchemaAware(connectionId)) return;
|
||||
const dbType = connectionStore.getConfig(connectionId)?.db_type;
|
||||
if (!database && !isSingleDatabase(dbType)) return;
|
||||
const key = cacheKey(connectionId, database);
|
||||
if (loadingSchemaOptions.value[key]) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user