Added list of constraints to the tables page.

Last column shows the full textual definition until I have decided on
a better way to visualize the details.
This commit is contained in:
eelke 2017-12-30 12:57:55 +01:00
parent 22db22c6b1
commit a99f059b70
27 changed files with 663 additions and 22 deletions

View file

@ -38,19 +38,31 @@ QString getRoleDisplayString(const PgDatabaseCatalog &cat, Oid oid)
QString getNamespaceDisplayString(const PgDatabaseCatalog &cat, Oid oid)
{
//QString name;
QString result;
auto nss = cat.namespaces();
auto ns = nss->getByKey(oid);
// if (auth_ids) {
// const PgAuthId& auth_id = auth_ids->getByOid(oid);
// if (auth_id.valid()) {
// name = auth_id.name;
// }
// }
//return name;
// TODO load list and lookup name
return ns.name; //QString("ns %1").arg(oid);
result = ns.name; //QString("ns %1").arg(oid);
return result;
}
QString getClassDisplayString(const PgDatabaseCatalog &cat, Oid oid)
{
QString result;
auto l = cat.classes();
auto e = l->getByKey(oid);
result = e.name;
return result;
}
QString getIndexDisplayString(const PgDatabaseCatalog &cat, Oid oid)
{
QString result;
// auto l = cat.indexes();
// auto e = l->getByKey(oid);
// if (e)
result = getClassDisplayString(cat, oid);
return result;
}
QString getTablespaceDisplayString(const PgDatabaseCatalog &cat, Oid oid)