fix(oracle): refresh table hover metadata from local index

Closes #8056
This commit is contained in:
t8y2 committed 2026-09-04 00:44:21 +08:00
1 parent fe955da729
commit 37dc74d9de
4 files changed
+109 -10

No files matched your search

+7 -1
View File
@@ -7711,7 +7711,13 @@ export const useConnectionStore = defineStore("connection", () => {
// case-insensitive because tableMatchScore normalizes internally.
const relaxedFilter = relaxedCompletionTableFilter(trimmedFilter);
const cacheKey = `${connectionId}:${database}:${catalog ?? ""}:${trimmedFilter}:${limit ?? ""}:${schema ?? ""}:${globalSearch ? "global" : "scoped"}:${currentSchema ?? ""}`;
if (completionTablesCache.value[cacheKey]) {
const cachedTables = completionTablesCache.value[cacheKey];
if (cachedTables) {
const localTables = lookupLocalCompletionTables(connectionId, database, trimmedFilter, limit, schema, catalog);
if (localTables.length === 0) return cachedTables;
const mergedTables = dedupeCompletionTables([...localTables, ...cachedTables]);
completionTablesCache.value[cacheKey] = limit ? mergedTables.slice(0, limit) : mergedTables;
indexCompletionTables(connectionId, database, schema, completionTablesCache.value[cacheKey], catalog);
return completionTablesCache.value[cacheKey];
}
const requestRevision = completionCacheRevision(connectionId, database);