1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-23 13:17:14 +01:00
SqMod/vendor/POCO/Data/src/SessionImpl.cpp
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

59 lines
925 B
C++

//
// SessionImpl.cpp
//
// Library: Data
// Package: DataCore
// Module: SessionImpl
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Data/SessionImpl.h"
#include "Poco/Exception.h"
namespace Poco {
namespace Data {
SessionImpl::SessionImpl(const std::string& connectionString, std::size_t timeout):
_connectionString(connectionString),
_loginTimeout(timeout)
{
}
SessionImpl::~SessionImpl()
{
}
void SessionImpl::reconnect()
{
close();
open();
}
void SessionImpl::setConnectionString(const std::string& connectionString)
{
if (isConnected())
throw Poco::InvalidAccessException("Can not change connection string on connected session."
" Close the session first.");
_connectionString = connectionString;
}
bool SessionImpl::isGood() const
{
return isConnected();
}
} } // namespace Poco::Data