Bezig met crudmodel/tab
This commit is contained in:
parent
ee321b3fb1
commit
14ab400ccb
15 changed files with 308 additions and 33 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue