mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 10:16:00 +00:00
row count info added to mongoDB
This commit is contained in:
@@ -8,9 +8,12 @@ class Analyser extends DatabaseAnalyser {
|
||||
async _runAnalysis() {
|
||||
const collections = await this.pool.__getDatabase().listCollections().toArray();
|
||||
|
||||
const stats = await Promise.all(collections.map((x) => this.pool.__getDatabase().collection(x.name).stats()));
|
||||
|
||||
const res = this.mergeAnalyseResult({
|
||||
collections: collections.map((x) => ({
|
||||
collections: collections.map((x, index) => ({
|
||||
pureName: x.name,
|
||||
tableRowCount: stats[index].count,
|
||||
})),
|
||||
});
|
||||
// console.log('MERGED', res);
|
||||
|
||||
Reference in New Issue
Block a user