wip: codegenerator, basic widget present for showing the generated code and specifying

parameters. Some code is also generated but it is not complete yet.

minimum still required
- field assignments
- properly format and escape the query string
This commit is contained in:
eelke 2018-09-18 11:53:19 +02:00
parent daf9536bed
commit f5145f36ed
19 changed files with 380 additions and 32 deletions

33
pglab/CodeGenerator.h Normal file
View file

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