digiKam
|
Public Member Functions | |
void | allowLift () |
CoreDbOperationGroup () | |
CoreDbOperationGroup (CoreDbAccess *const access) | |
void | lift () |
void | resetTime () |
void | setMaximumTime (int msecs) |
~CoreDbOperationGroup () | |
When you intend to execute a number of write operations to the database, group them while holding a CoreDbOperationGroup. 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::CoreDbOperationGroup::CoreDbOperationGroup | ( | ) |
Retrieve a CoreDbAccess object each time when constructing and destructing.
|
explicit |
Use an existing CoreDbAccess object, which must live as long as this object exists.
Digikam::CoreDbOperationGroup::~CoreDbOperationGroup | ( | ) |
void Digikam::CoreDbOperationGroup::allowLift | ( | ) |
Allows to lift(). The transaction will be lifted if the time set by setMaximumTime() has expired.
References lift().
Referenced by Digikam::FileActionMngrDatabaseWorker::applyMetadata(), Digikam::FileActionMngrDatabaseWorker::assignColorLabel(), Digikam::FileActionMngrDatabaseWorker::assignPickLabel(), Digikam::FileActionMngrDatabaseWorker::assignRating(), Digikam::DigikamItemView::dragDropSort(), Digikam::FileActionMngrDatabaseWorker::editGroup(), Digikam::AlbumManager::mergeTAlbum(), and Digikam::FaceTagsEditor::removeNormalTags().
void Digikam::CoreDbOperationGroup::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::CoreDbOperationGroup::resetTime | ( | ) |
Resets to 0 the time used by allowLift()
void Digikam::CoreDbOperationGroup::setMaximumTime | ( | int | msecs | ) |
Referenced by Digikam::FileActionMngrDatabaseWorker::applyMetadata(), Digikam::FileActionMngrDatabaseWorker::assignColorLabel(), Digikam::FileActionMngrDatabaseWorker::assignPickLabel(), Digikam::FileActionMngrDatabaseWorker::assignRating(), Digikam::DigikamItemView::dragDropSort(), Digikam::FileActionMngrDatabaseWorker::editGroup(), Digikam::AlbumManager::mergeTAlbum(), Digikam::FaceTagsEditor::removeNormalTags(), Digikam::EmptyDTrashItemsJob::run(), and Digikam::FileActionMngrDatabaseWorker::setExifOrientation().