2017-12-17 11:28:20 +01:00
|
|
|
|
#include "PgIndex.h"
|
2018-08-25 18:11:12 +02:00
|
|
|
|
#include "PgDatabaseCatalog.h"
|
|
|
|
|
|
#include "PgClassContainer.h"
|
|
|
|
|
|
#include "PgAmContainer.h"
|
2017-12-16 21:43:51 +01:00
|
|
|
|
|
2018-08-25 18:11:12 +02:00
|
|
|
|
QString PgIndex::getAm() const
|
|
|
|
|
|
{
|
2018-11-18 19:30:45 +01:00
|
|
|
|
auto&& cat = catalog();
|
2018-08-25 18:11:12 +02:00
|
|
|
|
QString result;
|
2018-11-25 19:45:06 +01:00
|
|
|
|
auto idxcls = cat.classes()->getByKey(oid());
|
2018-11-18 19:30:45 +01:00
|
|
|
|
if (idxcls) {
|
|
|
|
|
|
auto am = cat.ams()->getByKey(idxcls->am);
|
|
|
|
|
|
if (am)
|
2018-11-25 19:45:06 +01:00
|
|
|
|
result = am->name; // objectName();
|
2018-08-25 18:11:12 +02:00
|
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
|
|
|
}
|