digiKam Developer Documentation: Digikam::CoreDbOperationGroup Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Digikam::CoreDbOperationGroup Class Reference

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)

## Detailed Description

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.

## Member Function Documentation

## ◆ allowLift()

void Digikam::CoreDbOperationGroup::allowLift | ( |  | ) |

The transaction will be lifted if the time set by setMaximumTime() has expired.

## ◆ lift()

void Digikam::CoreDbOperationGroup::lift | ( |  | ) |

This may improve concurrent access.