pgLab/pglablib/PgNamespaceContainer.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

21 lines
480 B
C++

#include "PgNamespaceContainer.h"
#include "Pgsql_Col.h"
#include "Pgsql_Result.h"
#include "Pgsql_Value.h"
std::string PgNamespaceContainer::getLoadQuery() const
{
return "SELECT oid, nspname, nspowner, nspacl FROM pg_catalog.pg_namespace";
}
PgNamespace PgNamespaceContainer::loadElem(const Pgsql::Row &row)
{
Pgsql::Col col(row);
Oid oid = col.nextValue();
QString name = col.nextValue();
PgNamespace v(m_catalog, oid, name);
col >> v.owner >> v.acl;
return v;
}