digiKam
Digikam::FaceDbOperationGroup Class Reference

Public Member Functions

void allowLift ()
 
 FaceDbOperationGroup ()
 
 FaceDbOperationGroup (FaceDbAccess *const dbAccess)
 
void lift ()
 
void resetTime ()
 
void setMaximumTime (int msecs)
 
 ~FaceDbOperationGroup ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FaceDbOperationGroup() [1/2]

Digikam::FaceDbOperationGroup::FaceDbOperationGroup ( )

Retrieve a FaceDbAccess object each time when constructing and destructing.

◆ FaceDbOperationGroup() [2/2]

Digikam::FaceDbOperationGroup::FaceDbOperationGroup ( FaceDbAccess *const  dbAccess)
explicit

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

◆ ~FaceDbOperationGroup()

Digikam::FaceDbOperationGroup::~FaceDbOperationGroup ( )

Member Function Documentation

◆ allowLift()

void Digikam::FaceDbOperationGroup::allowLift ( )

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

References lift().

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

◆ resetTime()

void Digikam::FaceDbOperationGroup::resetTime ( )

Resets to 0 the time used by allowLift()

◆ setMaximumTime()

void Digikam::FaceDbOperationGroup::setMaximumTime ( int  msecs)

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