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:
aleks-f
2012-12-23 02:36:01 -06:00
parent 16533ef73b
commit 760fa4bbb0
12 changed files with 3969 additions and 2723 deletions

View File

@@ -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

View File

@@ -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;