Mercurial > hg > orthanc-databases
comparison Framework/PostgreSQL/PostgreSQLDatabase.cpp @ 29:2fb9cd42af14
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 16 Jul 2018 15:20:35 +0200 |
parents | b2ff1cd2907a |
children | 6a574d810b98 |
comparison
equal
deleted
inserted
replaced
28:c0cb5d2cd696 | 29:2fb9cd42af14 |
---|---|
102 | 102 |
103 void PostgreSQLDatabase::AdvisoryLock(int32_t lock) | 103 void PostgreSQLDatabase::AdvisoryLock(int32_t lock) |
104 { | 104 { |
105 PostgreSQLTransaction transaction(*this); | 105 PostgreSQLTransaction transaction(*this); |
106 | 106 |
107 PostgreSQLStatement s(*this, "select pg_try_advisory_lock(" + | 107 Query query("select pg_try_advisory_lock(" + |
108 boost::lexical_cast<std::string>(lock) + ");"); | 108 boost::lexical_cast<std::string>(lock) + ");", false); |
109 PostgreSQLStatement s(*this, query); | |
109 | 110 |
110 PostgreSQLResult result(s); | 111 PostgreSQLResult result(s); |
111 if (result.IsDone() || | 112 if (result.IsDone() || |
112 !result.GetBoolean(0)) | 113 !result.GetBoolean(0)) |
113 { | 114 { |