Sequence and Function pages are now properly filtered on namespace.

This commit is contained in:
eelke 2019-02-09 20:37:34 +01:00
parent 7ca671a078
commit f2808de613
17 changed files with 136 additions and 48 deletions

View file

@ -1,8 +1,8 @@
#ifndef SEQUENCEMODEL_H
#define SEQUENCEMODEL_H
#include "NamespaceFilter.h"
#include <QAbstractTableModel>
//#include "catalog/PgClass.h"
#include "catalog/PgSequence.h"
#include <memory>
@ -34,6 +34,7 @@ public:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
void setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat);
void SequenceModel::setNamespaceFilter(NamespaceFilter filter);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
@ -42,7 +43,10 @@ public:
PgSequence sequence(int row) const;
private:
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
std::shared_ptr<const PgSequenceContainer> m_sequences;
std::vector<PgSequence> m_sequences;
NamespaceFilter m_namespaceFilter = NamespaceFilter::User;
void reloadData();
};
#endif // SEQUENCEMODEL_H