mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +01:00
data fixes (getters constness, string any handling)
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
||||
~SessionImpl();
|
||||
/// Destroys the SessionImpl.
|
||||
|
||||
Poco::Data::StatementImpl* createStatementImpl();
|
||||
Poco::SharedPtr<Poco::Data::StatementImpl> createStatementImpl();
|
||||
/// Returns an SQLite StatementImpl.
|
||||
|
||||
void open(const std::string& connect = "");
|
||||
@@ -68,14 +68,14 @@ public:
|
||||
void close();
|
||||
/// Closes the session.
|
||||
|
||||
bool isConnected();
|
||||
bool isConnected() const;
|
||||
/// Returns true if connected, false otherwise.
|
||||
|
||||
void setConnectionTimeout(std::size_t timeout);
|
||||
/// Sets the session connection timeout value.
|
||||
/// Timeout value is in seconds.
|
||||
|
||||
std::size_t getConnectionTimeout();
|
||||
std::size_t getConnectionTimeout() const;
|
||||
/// Returns the session connection timeout value.
|
||||
/// Timeout value is in seconds.
|
||||
|
||||
@@ -88,30 +88,30 @@ public:
|
||||
void rollback();
|
||||
/// Aborts a transaction.
|
||||
|
||||
bool canTransact();
|
||||
bool canTransact() const;
|
||||
/// Returns true if session has transaction capabilities.
|
||||
|
||||
bool isTransaction();
|
||||
bool isTransaction() const;
|
||||
/// Returns true iff a transaction is a transaction is in progress, false otherwise.
|
||||
|
||||
void setTransactionIsolation(Poco::UInt32 ti);
|
||||
/// Sets the transaction isolation level.
|
||||
|
||||
Poco::UInt32 getTransactionIsolation();
|
||||
Poco::UInt32 getTransactionIsolation() const;
|
||||
/// Returns the transaction isolation level.
|
||||
|
||||
bool hasTransactionIsolation(Poco::UInt32 ti);
|
||||
bool hasTransactionIsolation(Poco::UInt32 ti) const;
|
||||
/// Returns true iff the transaction isolation level corresponding
|
||||
/// to the supplied bitmask is supported.
|
||||
|
||||
bool isTransactionIsolation(Poco::UInt32 ti);
|
||||
bool isTransactionIsolation(Poco::UInt32 ti) const;
|
||||
/// Returns true iff the transaction isolation level corresponds
|
||||
/// to the supplied bitmask.
|
||||
|
||||
void autoCommit(const std::string&, bool val);
|
||||
/// Sets autocommit property for the session.
|
||||
|
||||
bool isAutoCommit(const std::string& name="");
|
||||
bool isAutoCommit(const std::string& name="") const;
|
||||
/// Returns autocommit property value.
|
||||
|
||||
const std::string& connectorName() const;
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
protected:
|
||||
void setConnectionTimeout(const std::string& prop, const Poco::Any& value);
|
||||
Poco::Any getConnectionTimeout(const std::string& prop);
|
||||
Poco::Any getConnectionTimeout(const std::string& prop) const;
|
||||
|
||||
private:
|
||||
std::string _connector;
|
||||
@@ -127,6 +127,7 @@ private:
|
||||
bool _connected;
|
||||
bool _isTransaction;
|
||||
int _timeout;
|
||||
mutable
|
||||
Poco::Mutex _mutex;
|
||||
|
||||
static const std::string DEFERRED_BEGIN_TRANSACTION;
|
||||
@@ -138,13 +139,13 @@ private:
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool SessionImpl::canTransact()
|
||||
inline bool SessionImpl::canTransact() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
inline bool SessionImpl::isTransaction()
|
||||
inline bool SessionImpl::isTransaction() const
|
||||
{
|
||||
return _isTransaction;
|
||||
}
|
||||
@@ -156,7 +157,7 @@ inline const std::string& SessionImpl::connectorName() const
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t SessionImpl::getConnectionTimeout()
|
||||
inline std::size_t SessionImpl::getConnectionTimeout() const
|
||||
{
|
||||
return static_cast<std::size_t>(_timeout/1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user