kexi

#include <sqlitevacuum.h>

Inherits TQObject.

Public Slots

void readFromStdout ()
 
void processExited ()
 
void cancelClicked ()
 

Public Member Functions

 SQLiteVacuum (const TQString &filePath)
 
tristate run ()
 

Protected Attributes

TQString m_filePath
 
TQProcess * m_process
 
KProgressDialog * m_dlg
 
int m_percent
 
tristate m_result
 

Detailed Description

Helper class performing interactive compacting (VACUUM) of the SQLite database.

Proved SQLite database filename in the constructor. Then execute run() should be executed.

KProgressDialog will be displayed. Its progress bar will be updated whenever another table's data compacting is performed. User can click "Cancel" button in any time (except the final committing) to cancel the operation. In this case, it's guaranteed that the original file remains unchanged.

This is possible because we rely on SQLite's VACUUM SQL command, which itself temporarily creates a copy of the original database file, and replaces the orginal with the new only on success.

Definition at line 45 of file sqlitevacuum.h.

Constructor & Destructor Documentation

◆ SQLiteVacuum()

SQLiteVacuum::SQLiteVacuum ( const TQString &  filePath)

Definition at line 39 of file sqlitevacuum.cpp.

◆ ~SQLiteVacuum()

SQLiteVacuum::~SQLiteVacuum ( )

Definition at line 48 of file sqlitevacuum.cpp.

Member Function Documentation

◆ cancelClicked

void SQLiteVacuum::cancelClicked ( )
slot

Definition at line 142 of file sqlitevacuum.cpp.

◆ processExited

void SQLiteVacuum::processExited ( )
slot

Definition at line 134 of file sqlitevacuum.cpp.

◆ readFromStdout

void SQLiteVacuum::readFromStdout ( )
slot

Definition at line 106 of file sqlitevacuum.cpp.

◆ run()

tristate SQLiteVacuum::run ( )

Performs compacting procedure.

Returns
true on success, false on failure and cancelled if user clicked "Cancel" button in the progress dialog.

Definition at line 56 of file sqlitevacuum.cpp.

Member Data Documentation

◆ m_dlg

KProgressDialog* SQLiteVacuum::m_dlg
protected

Definition at line 66 of file sqlitevacuum.h.

◆ m_filePath

TQString SQLiteVacuum::m_filePath
protected

Definition at line 64 of file sqlitevacuum.h.

◆ m_percent

int SQLiteVacuum::m_percent
protected

Definition at line 67 of file sqlitevacuum.h.

◆ m_process

TQProcess* SQLiteVacuum::m_process
protected

Definition at line 65 of file sqlitevacuum.h.

◆ m_result

tristate SQLiteVacuum::m_result
protected

Definition at line 68 of file sqlitevacuum.h.


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