PgType now inherits from PgNamespaceObject and PgOwnedObject

This commit is contained in:
eelke 2018-12-16 09:24:27 +01:00
parent 742fd0a4d3
commit 44358d198a
10 changed files with 37 additions and 54 deletions

View file

@ -49,7 +49,7 @@ void TypeSelectionItemModel::setTypeList(std::shared_ptr<const PgTypeContainer>
m_types.clear();
for (const auto &e : *types) {
if (e.category != TypCategory::Array && e.type != "c") {
m_types.push_back(e.name);
m_types.push_back(e.objectName());
}
}
std::sort(m_types.begin(), m_types.end());
@ -87,8 +87,8 @@ QVariant TypeModel::data(const QModelIndex &index, int role) const
//const PgType &tp = m_types->getByIdx(row);
auto elem = m_types->getByIdx(row);
switch (column) {
case OidCol: return elem.oid;
case NameCol: return elem.name;
case OidCol: return elem.oid();
case NameCol: return elem.objectName();
}
}
}