Fix reading from catalog so that information about declarative partitioning is read correctly
(View and SQL generation still need fixes)
This commit is contained in:
parent
0cd019db92
commit
33319e3461
4 changed files with 43 additions and 12 deletions
|
|
@ -33,6 +33,20 @@ void TablesTableModel::setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat)
|
|||
refresh();
|
||||
}
|
||||
|
||||
bool TableLike(RelKind relkind)
|
||||
{
|
||||
switch (relkind) {
|
||||
case RelKind::Table:
|
||||
case RelKind::View:
|
||||
case RelKind::MaterializedView:
|
||||
case RelKind::ForeignTable:
|
||||
case RelKind::PartitionedTable:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void TablesTableModel::refresh()
|
||||
{
|
||||
beginResetModel();
|
||||
|
|
@ -48,8 +62,7 @@ void TablesTableModel::refresh()
|
|||
m_tables.clear();
|
||||
for (const auto &e : *classes) {
|
||||
bool add = false;
|
||||
if (e.kind == RelKind::Table || e.kind == RelKind::View
|
||||
|| e.kind == RelKind::MaterializedView || e.kind == RelKind::ForeignTable) {
|
||||
if (TableLike(e.kind)) {
|
||||
switch (m_namespaceFilter) {
|
||||
case NamespaceFilter::User:
|
||||
add = !e.ns().isSystemCatalog();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue