Revert "Merge branch 'update-packages'"

This reverts commit c4f322bda2, reversing
changes made to f090661eb9.
This commit is contained in:
Jan Prochazka
2024-02-12 13:08:30 +01:00
parent 92d13dda31
commit 9ad82caac5
3 changed files with 59 additions and 72 deletions

View File

@@ -10,24 +10,9 @@ class Analyser extends DatabaseAnalyser {
const collections = collectionsAndViews.filter((x) => x.type == 'collection');
const views = collectionsAndViews.filter((x) => x.type == 'view');
let stats;
try {
stats = await Promise.all(
collections
.filter((x) => x.type == 'collection')
.map((x) =>
this.pool
.__getDatabase()
.collection(x.name)
.aggregate([{ $collStats: { count: {} } }])
.toArray()
.then((resp) => ({ name: x.name, count: resp[0].count }))
)
);
} catch (e) {
// $collStats not supported
stats = {};
}
const stats = await Promise.all(
collections.filter((x) => x.type == 'collection').map((x) => this.pool.__getDatabase().collection(x.name).stats())
);
const res = this.mergeAnalyseResult({
collections: [