digiKam
Digikam::CoreDbOperationGroup Class Reference

Public Member Functions

void allowLift ()
 
 CoreDbOperationGroup ()
 
 CoreDbOperationGroup (CoreDbAccess *const access)
 
void lift ()
 
void resetTime ()
 
void setMaximumTime (int msecs)
 
 ~CoreDbOperationGroup ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CoreDbOperationGroup() [1/2]

Digikam::CoreDbOperationGroup::CoreDbOperationGroup ( )

Retrieve a CoreDbAccess object each time when constructing and destructing.

◆ CoreDbOperationGroup() [2/2]

Digikam::CoreDbOperationGroup::CoreDbOperationGroup ( CoreDbAccess *const  access)
explicit

Use an existing CoreDbAccess object, which must live as long as this object exists.

◆ ~CoreDbOperationGroup()

Digikam::CoreDbOperationGroup::~CoreDbOperationGroup ( )

Member Function Documentation

◆ allowLift()

◆ lift()

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().

◆ resetTime()

void Digikam::CoreDbOperationGroup::resetTime ( )

Resets to 0 the time used by allowLift()

◆ setMaximumTime()


The documentation for this class was generated from the following files: