2017-12-12 20:13:53 +01:00
|
|
|
|
#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";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-11-18 19:30:45 +01:00
|
|
|
|
PgNamespace PgNamespaceContainer::loadElem(const Pgsql::Row &row)
|
2017-12-12 20:13:53 +01:00
|
|
|
|
{
|
2018-11-18 19:30:45 +01:00
|
|
|
|
Pgsql::Col col(row);
|
2018-11-25 19:45:06 +01:00
|
|
|
|
|
|
|
|
|
|
Oid oid = col.nextValue();
|
|
|
|
|
|
QString name = col.nextValue();
|
|
|
|
|
|
PgNamespace v(m_catalog, oid, name);
|
2018-12-27 12:05:48 +01:00
|
|
|
|
Oid owner;
|
|
|
|
|
|
AclList acl_list;
|
|
|
|
|
|
col >> owner >> acl_list;
|
|
|
|
|
|
v.setOwnerOid(owner);
|
|
|
|
|
|
v.setAcls(std::move(acl_list));
|
|
|
|
|
|
|
2018-11-18 19:30:45 +01:00
|
|
|
|
return v;
|
2017-12-12 20:13:53 +01:00
|
|
|
|
}
|
2018-11-18 19:30:45 +01:00
|
|
|
|
|