mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
added shared cache support to sqlite
This commit is contained in:
parent
5d5c7a0586
commit
6827e13c0f
@ -8,7 +8,8 @@
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
SYSFLAGS += -DTHREADSAFE -DNO_TCL -DSQLITE_DISABLE_LFS
|
||||
SYSFLAGS += -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK \
|
||||
-DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE
|
||||
|
||||
objects = Binder Extractor SessionImpl Connector \
|
||||
SQLiteException SQLiteStatementImpl Utility \
|
||||
|
@ -73,6 +73,10 @@ public:
|
||||
|
||||
static void unregisterConnector();
|
||||
/// Unregisters the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory.
|
||||
|
||||
static void enableSharedCache(bool flag = true);
|
||||
/// Enables or disables SQlite shared cache mode
|
||||
/// (see http://www.sqlite.org/sharedcache.html for a discussion).
|
||||
};
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "Poco/Data/SQLite/Connector.h"
|
||||
#include "Poco/Data/SQLite/SessionImpl.h"
|
||||
#include "Poco/Data/SessionFactory.h"
|
||||
#include "sqlite3.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -75,4 +76,10 @@ void Connector::unregisterConnector()
|
||||
}
|
||||
|
||||
|
||||
void Connector::enableSharedCache(bool flag)
|
||||
{
|
||||
sqlite3_enable_shared_cache(flag ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::SQLite
|
||||
|
Loading…
Reference in New Issue
Block a user