SF [2643953] Improve Data::Session connection

This commit is contained in:
Aleksandar Fabijanic
2009-02-27 03:14:53 +00:00
parent 9bef44cab6
commit 68a79674c1
50 changed files with 689 additions and 165 deletions

View File

@@ -50,7 +50,8 @@ class SessionImpl: public Poco::Data::AbstractSessionImpl<SessionImpl>
/// A no-op implementation of SessionImpl for testing.
{
public:
SessionImpl(const std::string& init);
SessionImpl(const std::string& init,
std::size_t timeout = CONNECT_TIMEOUT_DEFAULT);
/// Creates the SessionImpl. Opens a connection to the database.
~SessionImpl();
@@ -59,6 +60,16 @@ public:
Poco::Data::StatementImpl* createStatementImpl();
/// Returns an test StatementImpl.
void open(const std::string& connectionString = "");
/// Opens the session.
void close();
/// Closes the session.
bool isConnected();
/// Returns true if session is connected to the database,
/// false otherwise.
void begin();
/// Starts a transaction.
@@ -67,13 +78,6 @@ public:
void rollback();
/// Aborts a transaction.
void close();
/// Closes the session.
bool isConnected();
/// Returns true if session is connected to the database,
/// false otherwise.
bool canTransact();
/// Returns true if session has transaction capabilities.