Implemented the loading of the list of types into the database catalogue.

This commit is contained in:
Eelke Klein 2017-02-01 20:00:25 +01:00
parent 43c3835350
commit 5a35fa6a30
3 changed files with 48 additions and 1 deletions

View file

@ -1,6 +1,29 @@
#include "pgsqldatabasecatalogue.h"
#include "pgsqldatabasecatalogue.h"
#include "pgtypecontainer.h"
#include "PgsqlConn.h"
PgsqlDatabaseCatalogue::PgsqlDatabaseCatalogue()
{
}
PgsqlDatabaseCatalogue::~PgsqlDatabaseCatalogue()
{
delete m_types;
}
void PgsqlDatabaseCatalogue::loadAll(Pgsql::Connection &conn)
{
loadTypes(conn);
}
void PgsqlDatabaseCatalogue::loadTypes(Pgsql::Connection &conn)
{
if (m_types == nullptr) {
m_types = new PgTypeContainer;
}
std::string q = m_types->getLoadQuery();
Pgsql::Result result = conn.query(q.c_str());
m_types->load(result);
}