X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c3d4d096451b5c683492e81574b302e5486950e1..a500fb72810060e52d87ad2c2e4691531f0bcc5a:/projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp index 6c483880..0d088759 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp @@ -27,7 +27,10 @@ */ #include "firebird_store.h" + #include "stg/ibpp.h" +#include "stg/corp_conf.h" +#include "stg/common.h" //----------------------------------------------------------------------------- int FIREBIRD_STORE::GetCorpsList(std::vector * corpsList) const @@ -37,14 +40,13 @@ STG_LOCKER lock(&mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); -std::string name; - try { tr->Start(); st->Execute("select name from tb_corporations"); while (st->Fetch()) { + std::string name; st->Get(1, name); corpsList->push_back(name); } @@ -62,7 +64,7 @@ catch (IBPP::Exception & ex) return 0; } //----------------------------------------------------------------------------- -int FIREBIRD_STORE::SaveCorp(const CORP_CONF & cc) const +int FIREBIRD_STORE::SaveCorp(const STG::CorpConf & cc) const { STG_LOCKER lock(&mutex); @@ -90,7 +92,7 @@ catch (IBPP::Exception & ex) return 0; } //----------------------------------------------------------------------------- -int FIREBIRD_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const +int FIREBIRD_STORE::RestoreCorp(STG::CorpConf * cc, const std::string & name) const { STG_LOCKER lock(&mutex);