better display of server version

This commit is contained in:
Jan Prochazka
2021-04-25 12:28:18 +02:00
parent d0cbd5d0a4
commit a8a9afc936
5 changed files with 38 additions and 13 deletions

View File

@@ -178,7 +178,10 @@ const driver = {
},
async getVersion(pool) {
const status = await pool.__getDatabase().admin().serverInfo();
return status;
return {
...status,
versionText: `MongoDB ${status.version}`,
};
},
async listDatabases(pool) {
const res = await pool.__getDatabase().admin().listDatabases();