Slightly more complex then you may expect because the tablespace specified by the tables tends to be oid 0 which means the default tablespace is used. However this does not mean pg_default, it means the tablespace as defined as standard in the database definition. So we need to know what the current dbname is retrieve it's details from the catalog and retrieve that tablespace to know what to show for an oid of 0.
25 lines
479 B
C++
25 lines
479 B
C++
#ifndef PGDATABASECONTAINER_H
|
|
#define PGDATABASECONTAINER_H
|
|
|
|
#include "PgContainer.h"
|
|
#include "PgDatabase.h"
|
|
|
|
namespace Pgsql {
|
|
|
|
class Result;
|
|
|
|
}
|
|
|
|
|
|
class PgDatabaseContainer: public PgContainer<PgDatabase> {
|
|
public:
|
|
//explicit PgDatabaseContainer(PgDatabaseCatalogue *cat);
|
|
using PgContainer<PgDatabase>::PgContainer;
|
|
|
|
virtual std::string getLoadQuery() const override;
|
|
virtual void load(const Pgsql::Result &res) override;
|
|
private:
|
|
};
|
|
|
|
|
|
#endif // PGDATABASECONTAINER_H
|