The table inheritance works mostly
This commit is contained in:
parent
ccd88d0578
commit
2ff9577d41
22 changed files with 473 additions and 145 deletions
|
|
@ -4,17 +4,24 @@
|
|||
|
||||
#include "PgContainer.h"
|
||||
#include "PgInherits.h"
|
||||
#include "Pgsql_declare.h"
|
||||
|
||||
class IFindParents
|
||||
{
|
||||
public:
|
||||
virtual std::vector<Oid> getParentsOf(Oid oid) const = 0;
|
||||
};
|
||||
|
||||
class PgInheritsContainer : public PgContainer<PgInherits, PgInherits::Key> {
|
||||
class PgInheritsContainer
|
||||
: public PgContainer<PgInherits, PgInherits::Key>
|
||||
, public IFindParents
|
||||
{
|
||||
public:
|
||||
using PgContainer<PgInherits, PgInherits::Key>::PgContainer;
|
||||
|
||||
virtual std::string getLoadQuery() const override;
|
||||
|
||||
/// Returns the parents in the correct order
|
||||
std::vector<Oid> getParentsOf(Oid oid) const;
|
||||
std::vector<Oid> getParentsOf(Oid oid) const override;
|
||||
protected:
|
||||
PgInherits loadElem(const Pgsql::Row &row) override;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue