X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b06f96581715a1cb67b70592fa7fd1ad34eb1dd1..7d1614894335eed4a086e1c2712dafea9c00a3f1:/projects/stargazer/plugins/store/mysql/mysql_store.cpp diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index d2509eaf..8e04f5a5 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -106,13 +106,13 @@ return msc.GetPlugin(); } //----------------------------------------------------------------------------- MYSQL_STORE_SETTINGS::MYSQL_STORE_SETTINGS() - : settings(NULL) + : settings(NULL), + errorStr(), + dbUser(), + dbPass(), + dbName(), + dbHost() { -} -//----------------------------------------------------------------------------- -MYSQL_STORE_SETTINGS::~MYSQL_STORE_SETTINGS() -{ - } //----------------------------------------------------------------------------- int MYSQL_STORE_SETTINGS::ParseParam(const vector & moduleParams, @@ -151,54 +151,24 @@ if (ParseParam(s.moduleParams, "server", dbHost) < 0 && return 0; } //----------------------------------------------------------------------------- -const string & MYSQL_STORE_SETTINGS::GetStrError() const -{ -return errorStr; -} -//----------------------------------------------------------------------------- -string MYSQL_STORE_SETTINGS::GetDBUser() const -{ -return dbUser; -} -//----------------------------------------------------------------------------- -string MYSQL_STORE_SETTINGS::GetDBPassword() const -{ -return dbPass; -} -//----------------------------------------------------------------------------- -string MYSQL_STORE_SETTINGS::GetDBHost() const -{ -return dbHost; -} -//----------------------------------------------------------------------------- -string MYSQL_STORE_SETTINGS::GetDBName() const -{ -return dbName; -} -//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- MYSQL_STORE::MYSQL_STORE() + : errorStr(), + version("mysql_store v.0.67"), + storeSettings(), + settings(), + logger(GetPluginLogger(GetStgLogger(), "store_mysql")) { -version = "mysql_store v.0.67"; }; //----------------------------------------------------------------------------- -MYSQL_STORE::~MYSQL_STORE() -{ -}; -//----------------------------------------------------------------------------- -void MYSQL_STORE::SetSettings(const MODULE_SETTINGS & s) -{ -settings = s; -} -//----------------------------------------------------------------------------- int MYSQL_STORE::MysqlQuery(const char* sQuery,MYSQL * sock) const { - int ret,i; + int ret; if( (ret = mysql_query(sock,sQuery)) ) { - for(i=0; i(id)); if(MysqlGetQuery(qbuf,sock)) {