#include "postgresql_store.h"
#include "stg/common.h"
-#include "stg/locker.h"
#include "stg/message.h"
#include <string>
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::AddMessage(STG::Message * msg, const std::string & login) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::EditMessage(const STG::Message & msg,
const std::string & login) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
STG::Message * msg,
const std::string &) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::DelMessage(uint64_t id, const std::string &) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::GetMessageHdrs(std::vector<STG::Message::Header> * hdrsList,
const std::string & login) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
if (PQstatus(connection) != CONNECTION_OK)
{