Populate table sizes
This commit is contained in:
parent
39dbab4d36
commit
abc0dd892f
10 changed files with 47 additions and 62 deletions
|
|
@ -50,12 +50,10 @@ public:
|
|||
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
// PgClass getTable(int row) const;
|
||||
RowItem rowItem(const QModelIndex &index) const
|
||||
{
|
||||
return nodeFromIndex(index)->_class;
|
||||
}
|
||||
// Oid getTableOid(int row) const;
|
||||
|
||||
static const TableNode* nodeFromIndex(const QModelIndex &index);
|
||||
|
||||
|
|
@ -69,7 +67,6 @@ private:
|
|||
|
||||
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
||||
NamespaceFilter m_namespaceFilter = NamespaceFilter::User;
|
||||
//t_Tables m_tables;
|
||||
std::shared_ptr<TableNode> rootNode;
|
||||
QMetaObject::Connection refreshConnection;
|
||||
std::shared_ptr<OpenDatabase> openDatabase;
|
||||
|
|
@ -78,9 +75,14 @@ private:
|
|||
Oid getType(int column) const;
|
||||
QVariant getData(const QModelIndex &index) const;
|
||||
|
||||
void StartLoadTableSizes(std::map<Oid, int> oidIndex);
|
||||
using OidClassIndex = std::map<Oid, std::shared_ptr<TableNode>>;
|
||||
|
||||
void StartLoadTableSizes(OidClassIndex oidIndex);
|
||||
TableSizes QueryTableSizes() const;
|
||||
void PopulateSizes(std::map<Oid, int> oidIndex, std::vector<TableSize> sizes);
|
||||
void PopulateSizes(
|
||||
const OidClassIndex &oidIndex,
|
||||
const std::vector<TableSize> &sizes
|
||||
);
|
||||
|
||||
|
||||
std::function<bool(const PgClass&)> GetNamespaceFilterLambda();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue