pgLab/pglab/CodeGenerator.h
eelke be0064f730 The codegen now can properly lookup array types.
Array type lookup failed previously because the typemapping class was
not yet receiving the list of types from the database. Fix was to pass
this data
2018-11-17 09:47:50 +01:00

36 lines
682 B
C++

#ifndef CODEGENERATOR_H
#define CODEGENERATOR_H
#include <QWidget>
#include "PlgPage.h"
#include "Pgsql_declare.h"
namespace Ui {
class CodeGenerator;
}
class PgDatabaseCatalog;
class CodeGenerator : public PlgPage
{
Q_OBJECT
public:
explicit CodeGenerator(QWidget *parent = nullptr);
~CodeGenerator();
void Init(std::shared_ptr<PgDatabaseCatalog> catalog, QString query, std::shared_ptr<const Pgsql::Result> dbres);
private slots:
void on_updateCodeButton_clicked();
private:
Ui::CodeGenerator *ui;
std::shared_ptr<PgDatabaseCatalog> m_catalog;
QString m_query;
std::shared_ptr<const Pgsql::Result> m_dbres;
void generateCode();
};
#endif // CODEGENERATOR_H