The list of indexes on a table now also shows the access method (ie btree)

This commit is contained in:
eelke 2018-08-25 18:11:12 +02:00
parent 7c4f1a4752
commit 50cb21b6f9
17 changed files with 198 additions and 26 deletions

View file

@ -1,3 +1,22 @@
#include "PgIndex.h"
#include "PgDatabaseCatalog.h"
#include "PgClassContainer.h"
#include "PgAmContainer.h"
PgIndex::PgIndex() = default;
PgIndex::PgIndex(std::weak_ptr<PgDatabaseCatalog> cat)
: PgObject(cat)
{}
QString PgIndex::getAm() const
{
auto cat = catalog.lock();
QString result;
if (cat) {
auto idxcls = cat->classes()->getByKey(indexrelid);
auto am = cat->ams()->getByKey(idxcls.am);
result = am.name;
}
return result;
}