Rename methods

resetConnection() -> reset()
This commit is contained in:
Vojtěch Erben 2018-11-20 10:09:40 +01:00
parent 6e6ad28a1f
commit 8f2fef23e4
10 changed files with 12 additions and 12 deletions

View File

@ -65,7 +65,7 @@ public:
void rollback();
/// Rollback transaction
void resetConnection();
void reset();
/// Reset connection with dababase and clears session state, but without disconnecting
operator MYSQL* ();

View File

@ -67,7 +67,7 @@ public:
void close();
/// Closes the connection.
void resetConnection();
void reset();
/// Reset connection with dababase and clears session state, but without disconnecting
bool isConnected() const;

View File

@ -176,7 +176,7 @@ void SessionHandle::rollback()
}
void SessionHandle::resetConnection()
void SessionHandle::reset()
{
if (mysql_reset_connection(_pHandle) != 0)
throw TransactionException("Reset connection failed.", _pHandle);

View File

@ -257,10 +257,10 @@ bool SessionImpl::hasTransactionIsolation(Poco::UInt32 ti) const
}
void SessionImpl::resetConnection()
void SessionImpl::reset()
{
if (_connected)
_handle.resetConnection();
_handle.reset();
}

View File

@ -68,7 +68,7 @@ public:
void close();
/// Closes the session.
void resetConnection();
void reset();
/// Do nothing
bool isConnected() const;

View File

@ -190,7 +190,7 @@ void SessionImpl::close()
}
void SessionImpl::resetConnection()
void SessionImpl::reset()
{
}

View File

@ -50,7 +50,7 @@ public:
void rollback();
void open(const std::string& connect = "");
void close();
void resetConnection();
void reset();
bool isConnected() const;
void setConnectionTimeout(std::size_t timeout);
std::size_t getConnectionTimeout() const;

View File

@ -92,7 +92,7 @@ public:
void reconnect();
/// Closes the connection and opens it again.
virtual void resetConnection() = 0;
virtual void reset() = 0;
/// Reset connection with dababase and clears session state, but without disconnecting
virtual void begin() = 0;

View File

@ -148,9 +148,9 @@ void PooledSessionImpl::close()
}
void PooledSessionImpl::resetConnection()
void PooledSessionImpl::reset()
{
access()->resetConnection();
access()->reset();
}

View File

@ -235,7 +235,7 @@ void SessionPool::putBack(PooledSessionHolderPtr pHolder)
{
if (pHolder->session()->isConnected())
{
pHolder->session()->resetConnection();
pHolder->session()->reset();
// reverse settings applied at acquisition time, if any
AddPropertyMap::iterator pIt = _addPropertyMap.find(pHolder->session());