2017-12-09 10:45:13 +01:00
|
|
|
|
#include "PgDatabaseContainer.h"
|
|
|
|
|
|
#include "Pgsql_Col.h"
|
2017-02-12 14:03:42 +01:00
|
|
|
|
|
|
|
|
|
|
std::string PgDatabaseContainer::getLoadQuery() const
|
|
|
|
|
|
{
|
2017-02-13 19:51:19 +01:00
|
|
|
|
return "SELECT oid,datname,datdba,encoding,datcollate,datctype,datistemplate,datallowconn,"
|
2017-02-12 14:03:42 +01:00
|
|
|
|
"datconnlimit,dattablespace,datacl FROM pg_database";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-11-18 19:30:45 +01:00
|
|
|
|
PgDatabase PgDatabaseContainer::loadElem(const Pgsql::Row &row)
|
2017-02-12 14:03:42 +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();
|
|
|
|
|
|
PgDatabase v(m_catalog, oid, name);
|
|
|
|
|
|
col >> v.dba >> v.encoding >> v.collate >> v.ctype >> v.isTemplate
|
2018-11-18 19:30:45 +01:00
|
|
|
|
>> v.allowConn >> v.connLimit >> v.tablespace >> v.acl;
|
|
|
|
|
|
return v;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
}
|
|
|
|
|
|
|