fix(completion): resolve ob-oracle schema for alias column completion

This commit is contained in:
zipg authored and GitHub committed 2026-08-26 15:07:37 +08:00
1 parent 1e9babca45
commit 6686d1628e
5 files changed
+112 -8

No files matched your search

@@ -1,5 +1,9 @@
import type { DatabaseType } from "@/types/database";
export function usesOracleCurrentSchemaCompletion(databaseType?: DatabaseType, schema?: string | null): boolean {
return (databaseType === "oracle" || databaseType === "oceanbase-oracle") && !schema;
}
export function usesOracleSessionCompletionColumns(options: { databaseType?: DatabaseType; selectedSchema?: string; referenceSchema?: string | null; clientSessionId?: string }): boolean {
return options.databaseType === "oracle" && !options.selectedSchema && !options.referenceSchema && !!options.clientSessionId;
return usesOracleCurrentSchemaCompletion(options.databaseType, options.referenceSchema || options.selectedSchema) && !!options.clientSessionId;
}