mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-21 04:14:53 +00:00
SQLite update event handling
This commit is contained in:
@@ -65,14 +65,18 @@ int Utility::_threadMode =
|
||||
SQLITE_CONFIG_MULTITHREAD;
|
||||
#endif
|
||||
|
||||
const int Utility::OPERATION_INSERT = SQLITE_INSERT;
|
||||
const int Utility::OPERATION_DELETE = SQLITE_DELETE;
|
||||
const int Utility::OPERATION_UPDATE = SQLITE_UPDATE;
|
||||
|
||||
const std::string Utility::SQLITE_DATE_FORMAT = "%Y-%m-%d";
|
||||
const std::string Utility::SQLITE_TIME_FORMAT = "%H:%M:%S";
|
||||
Utility::TypeMap Utility::_types;
|
||||
|
||||
Poco::Mutex Utility::_mutex;
|
||||
|
||||
Utility::Utility()
|
||||
{
|
||||
Poco::FastMutex::ScopedLock l(_mutex);
|
||||
Poco::Mutex::ScopedLock l(_mutex);
|
||||
|
||||
if (_types.empty())
|
||||
{
|
||||
@@ -299,4 +303,24 @@ bool Utility::setThreadMode(int mode)
|
||||
}
|
||||
|
||||
|
||||
void* Utility::eventHook(sqlite3* pDB, UpdateCallbackType callbackFn, void* pParam)
|
||||
{
|
||||
return sqlite3_update_hook(pDB, callbackFn, pParam);
|
||||
}
|
||||
|
||||
|
||||
void* Utility::eventHook(sqlite3* pDB, CommitCallbackType callbackFn, void* pParam)
|
||||
{
|
||||
return sqlite3_commit_hook(pDB, callbackFn, pParam);
|
||||
}
|
||||
|
||||
|
||||
void* Utility::eventHook(sqlite3* pDB, RollbackCallbackType callbackFn, void* pParam)
|
||||
{
|
||||
return sqlite3_rollback_hook(pDB, callbackFn, pParam);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::SQLite
|
||||
|
||||
Reference in New Issue
Block a user