Switching to linux for development of pglab.
Switched from qmake to cmake. Code changes to make it compile.
This commit is contained in:
parent
dd9906dbd8
commit
04723a289b
142 changed files with 124 additions and 83 deletions
|
|
@ -1,36 +0,0 @@
|
|||
#include "PgDatabaseContainer.h"
|
||||
#include "PgsqlConn.h"
|
||||
|
||||
PgDatabaseContainer::PgDatabaseContainer(PgsqlDatabaseCatalogue *cat)
|
||||
: PgContainer<PgDatabase>(cat)
|
||||
{}
|
||||
|
||||
std::string PgDatabaseContainer::getLoadQuery() const
|
||||
{
|
||||
return "SELECT oid,datname,datdba,encoding,datcollate,datctype,datistemplate,datallowconn,"
|
||||
"datconnlimit,dattablespace,datacl FROM pg_database";
|
||||
}
|
||||
|
||||
void PgDatabaseContainer::load(const Pgsql::Result &res)
|
||||
{
|
||||
const int n_rows = res.rows();
|
||||
m_container.clear();
|
||||
m_container.reserve(n_rows);
|
||||
for (auto row : res) {
|
||||
PgDatabase v;
|
||||
v.oid << row.get(0); // InvalidOid;
|
||||
v.name << row.get(1);
|
||||
v.dba << row.get(2); // owner?
|
||||
v.encoding << row.get(3);
|
||||
v.collate << row.get(4);
|
||||
v.ctype << row.get(5);
|
||||
v.isTemplate << row.get(6);
|
||||
v.allowConn << row.get(7);
|
||||
v.connLimit << row.get(8);
|
||||
v.tablespace << row.get(9);
|
||||
v.acl << row.get(10);
|
||||
m_container.push_back(v);
|
||||
}
|
||||
std::sort(m_container.begin(), m_container.end());
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue