X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c3d4d096451b5c683492e81574b302e5486950e1..c02633d77cb05a5deb05440d77b12ccc5bc19b85:/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp index 93b7c745..539fcf73 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_services.cpp @@ -28,7 +28,10 @@ */ #include "firebird_store.h" + #include "stg/ibpp.h" +#include "stg/service_conf.h" +#include "stg/common.h" //----------------------------------------------------------------------------- int FIREBIRD_STORE::GetServicesList(std::vector * servicesList) const @@ -38,14 +41,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_services"); while (st->Fetch()) { + std::string name; st->Get(1, name); servicesList->push_back(name); } @@ -63,7 +65,7 @@ catch (IBPP::Exception & ex) return 0; } //----------------------------------------------------------------------------- -int FIREBIRD_STORE::SaveService(const SERVICE_CONF & sc) const +int FIREBIRD_STORE::SaveService(const STG::ServiceConf & sc) const { STG_LOCKER lock(&mutex); @@ -97,7 +99,7 @@ catch (IBPP::Exception & ex) return 0; } //----------------------------------------------------------------------------- -int FIREBIRD_STORE::RestoreService(SERVICE_CONF * sc, +int FIREBIRD_STORE::RestoreService(STG::ServiceConf * sc, const std::string & name) const { STG_LOCKER lock(&mutex);