fix(mongodb): label sampled date and ObjectId fields with BSON types
This commit is contained in:
1 parent
ee2573f7db
commit
a28b5d5280
4 files changed
+108
-1
No files matched your search
@@ -8817,7 +8817,8 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
} catch {
|
||||
result = await api.mongoFindDocuments(connectionId, database, collection, 0, 100, "{}");
|
||||
}
|
||||
const fields = inferMongoCompletionFields(result.documents ?? []);
|
||||
const sampled = result.extended_documents?.length === result.documents.length ? result.extended_documents : result.documents;
|
||||
const fields = inferMongoCompletionFields(sampled ?? []);
|
||||
mongoCompletionFieldsCache.value[cacheKey] = fields;
|
||||
evictOldestCacheEntries(mongoCompletionFieldsCache.value, COMPLETION_CACHE_MAX);
|
||||
return fields;
|
||||
|
||||
Reference in new issue
Block a user