Bezig met crudmodel/tab

This commit is contained in:
eelke 2018-01-08 20:45:52 +01:00
parent ee321b3fb1
commit 14ab400ccb
15 changed files with 308 additions and 33 deletions

View file

@ -72,3 +72,15 @@ std::vector<PgConstraint> PgConstraintContainer::getConstraintsForRelation(Oid r
result.push_back(e);
return result;
}
boost::optional<PgConstraint> PgConstraintContainer::getPrimaryForRelation(Oid relid) const
{
boost::optional<PgConstraint> result;
for (const auto &e : m_container) {
if (e.relid == relid && e.type == ConstraintType::PrimaryKey) {
result = e;
break;
}
}
return result;
}