X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/73f662acc31034cd98fdc6e157454f7763ef0792..1347f3d1e04bedd1508589173f577673ee2c5554:/projects/stargazer/plugins/store/postgresql/postgresql_store_corporations.cpp diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_corporations.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_corporations.cpp index c358a4c5..1d33d5b0 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_corporations.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_corporations.cpp @@ -36,7 +36,7 @@ #include "stg/locker.h" //----------------------------------------------------------------------------- -int POSTGRESQL_STORE::GetCorpsList(vector * corpsList) const +int POSTGRESQL_STORE::GetCorpsList(std::vector * corpsList) const { STG_LOCKER lock(&mutex, __FILE__, __LINE__); @@ -127,7 +127,7 @@ if (EscapeString(ename)) return -1; } -std::stringstream query; +std::ostringstream query; query << "UPDATE tb_corporations SET " << "cash = " << cc.cash << "WHERE name = '" << ename << "'"; @@ -158,7 +158,7 @@ return 0; } //----------------------------------------------------------------------------- -int POSTGRESQL_STORE::RestoreCorp(CORP_CONF * cc, const string & name) const +int POSTGRESQL_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const { STG_LOCKER lock(&mutex, __FILE__, __LINE__); @@ -193,7 +193,7 @@ if (EscapeString(ename)) return -1; } -std::stringstream query; +std::ostringstream query; query << "SELECT cash FROM tb_corporations WHERE name = '" << ename << "'"; result = PQexec(connection, query.str().c_str()); @@ -241,7 +241,7 @@ return 0; } //----------------------------------------------------------------------------- -int POSTGRESQL_STORE::AddCorp(const string & name) const +int POSTGRESQL_STORE::AddCorp(const std::string & name) const { STG_LOCKER lock(&mutex, __FILE__, __LINE__); @@ -276,7 +276,7 @@ if (EscapeString(ename)) return -1; } -std::stringstream query; +std::ostringstream query; query << "INSERT INTO tb_corporations \ (name, cash) \ VALUES \ @@ -308,7 +308,7 @@ return 0; } //----------------------------------------------------------------------------- -int POSTGRESQL_STORE::DelCorp(const string & name) const +int POSTGRESQL_STORE::DelCorp(const std::string & name) const { STG_LOCKER lock(&mutex, __FILE__, __LINE__); @@ -343,7 +343,7 @@ if (EscapeString(ename)) return -1; } -std::stringstream query; +std::ostringstream query; query << "DELETE FROM tb_corporations WHERE name = '" << ename << "'"; result = PQexec(connection, query.str().c_str());