pgLab/pglablib/PgOwnedObject.cpp
eelke 73c4cf4790 Rework of catalog objects. Several of them are now inheriting from common
base classes that implement common functionality.
2018-11-25 19:45:06 +01:00

25 lines
441 B
C++

#include "PgOwnedObject.h"
#include "PgAuthId.h"
#include "PgAuthIdContainer.h"
#include "PgDatabaseCatalog.h"
void PgOwnedObject::setOwnerOid(PgDatabaseCatalog& cat, Oid oid)
{
m_ownerOid = oid;
m_owner = cat.authIds()->getByKey(oid);
}
Oid PgOwnedObject::ownerOid() const
{
return m_ownerOid;
}
QString PgOwnedObject::ownerName() const
{
return m_owner->name;
}
const PgAuthId* PgOwnedObject::owner() const
{
return m_owner;
}