mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 11:26:00 +00:00
Revert "Merge branch 'update-packages'"
This reverts commitc4f322bda2, reversing changes made tof090661eb9.
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user