mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-01 21:13:10 +01:00
see CHANGELOG
- upgraded SQLite to version 3.7.15.1 (2012-12-19) - fixed SQLite affectedRows reporting and added tests - added SQLite::Utility::isThreadSafe() function - added SQLite::Utility::setThreadMode(int mode) function - fixed GH #41: Buffer::resize crash
This commit is contained in:
@@ -80,4 +80,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Thread safety mode defaults to "serialized".
|
||||
// See http://www.sqlite.org/threadsafe.html for details.
|
||||
// Threading mode significantly affects performance
|
||||
// (see TestSuite::benchmarkThreadModesTiming)
|
||||
//
|
||||
#ifndef SQLITE_THREADSAFE
|
||||
#define SQLITE_THREADSAFE 1
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SQLite_SQLite_INCLUDED
|
||||
|
||||
@@ -63,6 +63,10 @@ public:
|
||||
static const std::string SQLITE_TIME_FORMAT;
|
||||
typedef std::map<std::string, MetaColumn::ColumnDataType> TypeMap;
|
||||
|
||||
static const int THREAD_MODE_SINGLE;
|
||||
static const int THREAD_MODE_MULTI;
|
||||
static const int THREAD_MODE_SERIAL;
|
||||
|
||||
Utility();
|
||||
/// Maps SQLite column declared types to Poco::Data types through
|
||||
/// static TypeMap member.
|
||||
@@ -92,6 +96,14 @@ public:
|
||||
///
|
||||
/// Returns true if succesful
|
||||
|
||||
static bool isThreadSafe();
|
||||
/// Returns true if SQLite was compiled in thread or serialized mode.
|
||||
/// See http://www.sqlite.org/c3ref/threadsafe.html for details.
|
||||
|
||||
static bool setThreadMode(int mode);
|
||||
/// Sets the threading mode to single, multi or serialized.
|
||||
/// See http://www.sqlite.org/threadsafe.html for details.
|
||||
|
||||
private:
|
||||
static TypeMap _types;
|
||||
Poco::FastMutex _mutex;
|
||||
|
||||
Reference in New Issue
Block a user