reference: Postgres.cpp changed to use SqlRunScript

git-svn-id: svn://ultimatepp.org/upp/trunk@5323 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-09-07 11:04:54 +00:00
parent 4fa78d11cd
commit c61a4d9108

View file

@ -28,20 +28,21 @@ bool PostgreSQLTest::OpenDB()
m_session.SetTrace();
#endif
SQL = m_session;
//schema
Progress p;
p.SetText(t_("Creating _DEBUG database"));
SqlSchema sch(PGSQL);
StdStatementExecutor se(m_session);
All_Tables(sch);
if(sch.ScriptChanged(SqlSchema::UPGRADE))
PostgreSQLPerformScript(sch.Upgrade(),se, p);
SqlPerformScript(sch.Upgrade(), p);
if(sch.ScriptChanged(SqlSchema::ATTRIBUTES)) {
PostgreSQLPerformScript(sch.Attributes(),se, p);
SqlPerformScript(sch.Attributes(), p);
}
if(sch.ScriptChanged(SqlSchema::CONFIG)) {
PostgreSQLPerformScript(sch.ConfigDrop(),se, p);
PostgreSQLPerformScript(sch.Config(),se, p);
SqlPerformScript(sch.ConfigDrop(), p);
SqlPerformScript(sch.Config(), p);
}
sch.SaveNormal();
@ -78,9 +79,6 @@ void PostgreSQLTest::ShowTestData()
m_array.Query();
}
GUI_APP_MAIN
{
PostgreSQLTest dlg;