1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-26 02:31:48 +02:00

Update POCO to 1.11.0

This commit is contained in:
Sandu Liviu Catalin
2021-08-22 18:07:06 +03:00
parent 151077c799
commit 7a3d92d1d1
450 changed files with 25219 additions and 6528 deletions

View File

@@ -86,7 +86,7 @@ void SessionHandle::connect(const std::string& aConnectionString)
_pConnection = PQconnectdb(aConnectionString.c_str());
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw ConnectionFailedException(std::string("Connection Error: ") + lastErrorNoLock());
}
@@ -151,6 +151,7 @@ void SessionHandle::disconnect()
}
}
// TODO: Figure out what happens if a connection is reset with a pending transaction
bool SessionHandle::reset()
{
@@ -174,7 +175,7 @@ std::string SessionHandle::lastError() const
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
return std::string();
}
@@ -196,7 +197,7 @@ void SessionHandle::startTransaction()
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -223,7 +224,7 @@ void SessionHandle::commit()
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -247,7 +248,7 @@ void SessionHandle::rollback()
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -291,7 +292,7 @@ void SessionHandle::setAsynchronousCommit(bool aShouldAsynchronousCommit)
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -318,7 +319,7 @@ void SessionHandle::cancel()
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -335,7 +336,7 @@ void SessionHandle::setTransactionIsolation(Poco::UInt32 aTI)
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -345,7 +346,7 @@ void SessionHandle::setTransactionIsolation(Poco::UInt32 aTI)
return;
}
if (! hasTransactionIsolation(aTI))
if (!hasTransactionIsolation(aTI))
{
throw Poco::InvalidArgumentException("setTransactionIsolation()");
}
@@ -354,12 +355,12 @@ void SessionHandle::setTransactionIsolation(Poco::UInt32 aTI)
switch (aTI)
{
case Session::TRANSACTION_READ_COMMITTED:
isolationLevel = POSTGRESQL_READ_COMMITTED; break;
case Session::TRANSACTION_REPEATABLE_READ:
isolationLevel = POSTGRESQL_REPEATABLE_READ; break;
case Session::TRANSACTION_SERIALIZABLE:
isolationLevel = POSTGRESQL_SERIALIZABLE; break;
case Session::TRANSACTION_READ_COMMITTED:
isolationLevel = POSTGRESQL_READ_COMMITTED; break;
case Session::TRANSACTION_REPEATABLE_READ:
isolationLevel = POSTGRESQL_REPEATABLE_READ; break;
case Session::TRANSACTION_SERIALIZABLE:
isolationLevel = POSTGRESQL_SERIALIZABLE; break;
}
PGresult* pPQResult = PQexec(_pConnection, Poco::format("SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL %s", isolationLevel).c_str());
@@ -393,12 +394,12 @@ void SessionHandle::deallocatePreparedStatement(const std::string& aPreparedStat
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
if (! _inTransaction)
if (!_inTransaction)
{
deallocatePreparedStatementNoLock(aPreparedStatementToDeAllocate);
}
@@ -431,7 +432,7 @@ void SessionHandle::deallocatePreparedStatementNoLock(const std::string& aPrepar
void SessionHandle::deallocateStoredPreparedStatements()
{
// DO NOT ACQUIRE THE MUTEX IN PRIVATE METHODS
while (! _preparedStatementsToBeDeallocated.empty())
while (!_preparedStatementsToBeDeallocated.empty())
{
deallocatePreparedStatementNoLock(_preparedStatementsToBeDeallocated.back());
@@ -444,7 +445,7 @@ int SessionHandle::serverVersion() const
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -457,7 +458,7 @@ int SessionHandle::serverProcessID() const
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -470,7 +471,7 @@ int SessionHandle::protocoVersion() const
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -483,7 +484,7 @@ std::string SessionHandle::clientEncoding() const
{
Poco::FastMutex::ScopedLock mutexLocker(_sessionMutex);
if (! isConnectedNoLock())
if (!isConnectedNoLock())
{
throw NotConnectedException();
}
@@ -502,7 +503,7 @@ SessionParametersMap SessionHandle::setConnectionInfoParameters(PQconninfoOption
{
SessionParametersMap sessionParametersMap;
while (0 != pConnInfOpt->keyword)
while (pConnInfOpt->keyword)
{
try
{
@@ -542,7 +543,7 @@ SessionParametersMap SessionHandle::connectionDefaultParameters()
SessionParametersMap SessionHandle::connectionParameters() const
{
if (! isConnected())
if (!isConnected())
{
throw NotConnectedException();
}