2018-02-05 21:42:54 +01:00
|
|
|
|
#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)
|
2018-11-25 19:45:06 +01:00
|
|
|
|
return update(table_class.nsName(), table_class.objectName(), alias);
|
2018-02-05 21:42:54 +01:00
|
|
|
|
}
|