![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
When you intend to execute a number of write operations to the database, group them while holding a CoreDbOperationGroup. More...
Public Member Functions | |
CoreDbOperationGroup () | |
Retrieve a CoreDbAccess object each time when constructing and destructing. | |
CoreDbOperationGroup (CoreDbAccess *const access) | |
Use an existing CoreDbAccess object, which must live as long as this object exists. | |
void | allowLift () |
Allows to lift(). | |
void | lift () |
This will - if a transaction is held - commit the transaction and acquire a new one. | |
void | resetTime () |
Resets to 0 the time used by allowLift() | |
void | setMaximumTime (int msecs) |
For some database systems (SQLite), keeping a transaction across write operations occurring in short time results in enormous speedup (800x). For system that do not need this optimization, this class is a no-op.
void Digikam::CoreDbOperationGroup::allowLift | ( | ) |
The transaction will be lifted if the time set by setMaximumTime() has expired.
void Digikam::CoreDbOperationGroup::lift | ( | ) |
This may improve concurrent access.