git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed "using namespace std;" from rscriptd.
[stg.git]
/
projects
/
stargazer
/
plugins
/
store
/
postgresql
/
postgresql_store.cpp
diff --git
a/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
b/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
index 073fccab5d92ce84e8a46c5dd6d25e7973e6914b..3a1d7272f1267d05ace0cb08fef059e184c8e5a3 100644
(file)
--- a/
projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
+++ b/
projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
@@
-49,12
+49,17
@@
#include "postgresql_store_utils.h"
#include "postgresql_store.h"
#include "postgresql_store_utils.h"
#include "postgresql_store.h"
-PLUGIN_CREATOR<POSTGRESQL_STORE> pqStoreeCreator;
+namespace
+{
+PLUGIN_CREATOR<POSTGRESQL_STORE> pgsc;
+}
+
+extern "C" STORE * GetStore();
//-----------------------------------------------------------------------------
STORE * GetStore()
{
//-----------------------------------------------------------------------------
STORE * GetStore()
{
-return p
qStoreeCreator
.GetPlugin();
+return p
gsc
.GetPlugin();
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
@@
-70,7
+75,8
@@
POSTGRESQL_STORE::POSTGRESQL_STORE()
mutex(),
version(0),
retries(3),
mutex(),
version(0),
retries(3),
- connection(NULL)
+ connection(NULL),
+ logger(GetPluginLogger(GetStgLogger(), "store_postgresql"))
{
pthread_mutex_init(&mutex, NULL);
}
{
pthread_mutex_init(&mutex, NULL);
}
@@
-87,7
+93,7
@@
pthread_mutex_destroy(&mutex);
int POSTGRESQL_STORE::ParseSettings()
{
std::vector<PARAM_VALUE>::iterator i;
int POSTGRESQL_STORE::ParseSettings()
{
std::vector<PARAM_VALUE>::iterator i;
-string s;
+st
d::st
ring s;
for(i = settings.moduleParams.begin(); i != settings.moduleParams.end(); ++i)
{
for(i = settings.moduleParams.begin(); i != settings.moduleParams.end(); ++i)
{
@@
-231,6
+237,8
@@
if (CommitTransaction())
return -1;
}
return -1;
}
+logger("POSTGRESQL_STORE: Current DB schema version: %d", version);
+
return 0;
}
//-----------------------------------------------------------------------------
return 0;
}
//-----------------------------------------------------------------------------