Added the list of installed language to the catalog. The ProcTableModel now returns the owner name and language name instead of the oids.

This commit is contained in:
eelke 2018-12-17 21:51:14 +01:00
parent c0a11f9b3b
commit f692569d27
11 changed files with 118 additions and 18 deletions

View file

@ -1,6 +1,7 @@
#include "ProcTableModel.h"
#include "catalog/PgDatabaseCatalog.h"
#include "catalog/PgProcContainer.h"
#include "catalog/PgLanguageContainer.h"
#include "CustomDataRole.h"
ProcTableModel::ProcTableModel(QObject *parent)
@ -80,8 +81,12 @@ QVariant ProcTableModel::getData(const QModelIndex &index) const
switch (index.column()) {
case NameCol: return t.objectName();
case NamespaceCol: return t.nsName();
case OwnerCol: return t.owner;
case LangCol: return t.lang;
case OwnerCol: return t.ownerName();
case LangCol: {
auto lan = m_catalog->languages()->getByKey(t.lang);
if (lan) return lan->objectName();
return t.lang;
}
case AclCol: return t.acl;
}
return QVariant();