Flexible models

This commit is contained in:
Eelke Klein 2018-09-02 10:30:30 +00:00
parent 50cb21b6f9
commit 8b7bbec807
24 changed files with 333 additions and 51 deletions

View file

@ -3,6 +3,7 @@
#include "Pgsql_Col.h"
#include "PgDatabaseCatalog.h"
#include "PgNamespaceContainer.h"
#include <iterator>
std::string PgClassContainer::getLoadQuery() const
{
@ -21,8 +22,10 @@ PgClass PgClassContainer::loadElem(const Pgsql::Row &row)
col >> v.oid >> v.name >> v.relnamespace >> v.type >> v.oftype
>> v.owner >> v.am >> v.filenode >> v.tablespace >> v.pages_est
>> v.tuples_est >> v.toastrelid >> v.isshared >> v.persistence
>> v.kind >> v.hasoids >> v.ispopulated >> v.frozenxid >> v.minmxid
>> v.acl >> v.options;
>> v.kind >> v.hasoids >> v.ispopulated >> v.frozenxid >> v.minmxid;
col.getAsArray<QString>(std::back_inserter(v.acl), Pgsql::NullHandling::Ignore);
col.getAsArray<QString>(std::back_inserter(v.options), Pgsql::NullHandling::Ignore);
auto cat = m_catalogue.lock();
auto ns = cat->namespaces()->getByKey(v.relnamespace);