fix(mongodb): display array structures as shell-style bson literals

This commit is contained in:
onenewcode authored and GitHub committed 2026-09-29 12:22:42 +08:00
1 parent 27078b8eed
commit cf78eebbc9
8 files changed
+223 -34

No files matched your search

@@ -716,7 +716,9 @@ async function exportAllDocumentStoreDocuments(onProgress?: (info: { rowsExporte
}
}
const result = mongoDocumentsToQueryResult(exportedDocuments, performance.now() - exportStartedAt, totalRows ?? exportedDocuments.length, exportedCopyDocuments, totalRows !== null);
// Exports consume source text (CSV/SQL), not the live grid's BSON-faithful
// cell encoding, so every document store keeps plain JSON cells here.
const result = mongoDocumentsToQueryResult(exportedDocuments, performance.now() - exportStartedAt, totalRows ?? exportedDocuments.length, exportedCopyDocuments, totalRows !== null, { documentGridValues: false });
if (result.columns.length === 0) result.columns = gridResult.value.columns;
result.column_types = kind === "mongodb" ? mongoDocumentGridColumnTypes(exportedDocuments, result.columns) : kind === "elasticsearch" ? elasticsearchGridColumnTypesFor(result.columns) : kind === "solr" ? solrGridColumnTypesFor(result.columns) : undefined;
result.affected_rows = exportedDocuments.length;