digiKam
|
Public Member Functions | |
void | allowLift () |
FaceDbOperationGroup () | |
FaceDbOperationGroup (FaceDbAccess *const dbAccess) | |
void | lift () |
void | resetTime () |
void | setMaximumTime (int msecs) |
~FaceDbOperationGroup () | |
When you intend to execute a number of write operations to the database, group them while holding a FaceDbOperationGroup. 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.
Digikam::FaceDbOperationGroup::FaceDbOperationGroup | ( | ) |
Retrieve a FaceDbAccess object each time when constructing and destructing.
|
explicit |
Use an existing FaceDbAccess object, which must live as long as this object exists.
Digikam::FaceDbOperationGroup::~FaceDbOperationGroup | ( | ) |
void Digikam::FaceDbOperationGroup::allowLift | ( | ) |
Allows to lift(). The transaction will be lifted if the time set by setMaximumTime() has expired.
References lift().
void Digikam::FaceDbOperationGroup::lift | ( | ) |
This will - if a transaction is held - commit the transaction and acquire a new one. This may improve concurrent access.
Referenced by allowLift().
void Digikam::FaceDbOperationGroup::resetTime | ( | ) |
Resets to 0 the time used by allowLift()
void Digikam::FaceDbOperationGroup::setMaximumTime | ( | int | msecs | ) |