pgLab/pglablib/QueryGenerator.cpp
eelke 73c4cf4790 Rework of catalog objects. Several of them are now inheriting from common
base classes that implement common functionality.
2018-11-25 19:45:06 +01:00

22 lines
678 B
C++

#include "QueryGenerator.h"
#include "PgDatabaseCatalog.h"
#include "PgClass.h"
#include "PgNamespace.h"
#include "PgNamespaceContainer.h"
using namespace Querygen;
QueryGeneratorFactory::QueryGeneratorFactory(std::shared_ptr<PgDatabaseCatalog> catalog)
: m_catalog(catalog)
{}
UpdatePtr QueryGeneratorFactory::update(QString ns, QString table_name, QString alias)
{
return std::make_shared<Update>(ns, table_name, alias);
}
UpdatePtr QueryGeneratorFactory::update(const PgClass &table_class, QString alias)
{
//QString nsname = m_catalog->namespaces()->getByKey(table_class.relnamespace_name)
return update(table_class.nsName(), table_class.objectName(), alias);
}