Kexi API Documentation (2.0 alpha)

SQLiteVacuum Class Reference

#include <sqlitevacuum.h>

List of all members.


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.

Public Slots

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

Public Member Functions

 SQLiteVacuum (const QString &filePath)
 ~SQLiteVacuum ()
tristate run ()

Protected Attributes

QString m_filePath
QProcess * m_process
KProgressDialogm_dlg
int m_percent
tristate m_result


Constructor & Destructor Documentation

SQLiteVacuum::SQLiteVacuum const QString filePath  ) 
 

Definition at line 39 of file sqlitevacuum.cpp.

References m_dlg, m_percent, m_process, and m_result.

SQLiteVacuum::~SQLiteVacuum  ) 
 

Definition at line 48 of file sqlitevacuum.cpp.

References m_dlg, and m_process.


Member Function Documentation

void SQLiteVacuum::cancelClicked  )  [slot]
 

Definition at line 142 of file sqlitevacuum.cpp.

References cancelled, m_process, and m_result.

Referenced by run().

void SQLiteVacuum::processExited  )  [slot]
 

Definition at line 134 of file sqlitevacuum.cpp.

References m_dlg.

Referenced by run().

void SQLiteVacuum::readFromStdout  )  [slot]
 

Definition at line 106 of file sqlitevacuum.cpp.

References m_dlg, m_percent, and m_process.

Referenced by 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.

References cancelClicked(), KexiDBDrvWarn, m_dlg, m_filePath, m_process, m_result, processExited(), and readFromStdout().

Referenced by SQLiteAdminTools::vacuum().


Member Data Documentation

KProgressDialog* SQLiteVacuum::m_dlg [protected]
 

Definition at line 65 of file sqlitevacuum.h.

Referenced by processExited(), readFromStdout(), run(), SQLiteVacuum(), and ~SQLiteVacuum().

QString SQLiteVacuum::m_filePath [protected]
 

Definition at line 63 of file sqlitevacuum.h.

Referenced by run().

int SQLiteVacuum::m_percent [protected]
 

Definition at line 66 of file sqlitevacuum.h.

Referenced by readFromStdout(), and SQLiteVacuum().

QProcess* SQLiteVacuum::m_process [protected]
 

Definition at line 64 of file sqlitevacuum.h.

Referenced by cancelClicked(), readFromStdout(), run(), SQLiteVacuum(), and ~SQLiteVacuum().

tristate SQLiteVacuum::m_result [protected]
 

Definition at line 67 of file sqlitevacuum.h.

Referenced by cancelClicked(), run(), and SQLiteVacuum().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:26 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003