mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
row count info added to mongoDB
This commit is contained in:
parent
0e92d51f3c
commit
b0d78250e1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user