pgLab/pglab/PgConstraintContainer.h
eelke 190a6c04dc Made a start with showing foreignkeys in column list.
Not finished, need to decide what to do with multiple and multi column fkeys.
2017-12-25 10:31:58 +01:00

21 lines
599 B
C++

#ifndef PGCONSTRAINTCONTAINER_H
#define PGCONSTRAINTCONTAINER_H
#include "PgContainer.h"
#include "PgConstraint.h"
#include "Pgsql_declare.h"
#include <vector>
class PgConstraintContainer : public PgContainer<PgConstraint> {
public:
using PgContainer<PgConstraint>::PgContainer;
virtual std::string getLoadQuery() const override;
//std::vector<PgConstraint> getIndexesForTable(Oid table_oid) const;
const PgConstraint* getFKeyForTableColumn(Oid relid, int16_t attnum) const;
protected:
virtual PgConstraint loadElem(const Pgsql::Row &row) override;
};
#endif // PGCONSTRAINTCONTAINER_H