Wrapper class for actual transactions. More...
#include <SQLiteDB.h>
Public Types | |
enum | TransactionType |
Definition of types of transactions supported. | |
Public Member Functions | |
Transaction (const Transaction &other) | |
Copy constructor. | |
virtual | ~Transaction () |
Destructor. | |
bool | Close () |
End the transaction (commiting it). | |
bool | Commit () |
Commit the transaction. | |
bool | Rollback () |
Rollback the transaction. | |
bool | Execute (LPCTSTR pSQL) |
Execute an SQL command as a part of the transaction. | |
bool | Execute (const std::string &sSQL) |
Execute an SQL command as a part of the transaction. | |
bool | Execute (Statement &state) |
Execute a statement as a part of the transaction. | |
Recordset | Query (LPCTSTR pSQL) |
Run query as a part of the transaction. | |
Recordset | Query (const std::string &sSQL) |
Run query as a part of the transaction. | |
Recordset | Query (Statement &state) |
Run a SELECT statement as a part of the transaction. | |
const std::tstring & | GetLastError () |
Retrieves the description of the last error found while performing the transaction. | |
virtual const Transaction & | operator= (const Transaction &other) |
Assignment operator. | |
Protected Member Functions | |
Transaction (RealTransaction *pReal) | |
Constructor from an actual transaction object. | |
void | AddRef () const |
Adds a reference to the actual transaction object. | |
void | DecRef () const |
Deletes a reference to the actual transaction object (can delete the object). | |
Protected Attributes | |
RealTransaction * | m_pReal |
Pointer to the actual transaction object wrapped. |
Wrapper class for actual transactions.
Definition at line 369 of file SQLiteDB.h.
SQLite::Transaction::Transaction | ( | const Transaction & | other | ) | [inline] |
Copy constructor.
other | The transaction wrapper object to copy from |
Definition at line 377 of file SQLiteDB.h.
References AddRef().
SQLite::Transaction::Transaction | ( | RealTransaction * | pReal | ) | [inline, protected] |
Constructor from an actual transaction object.
pReal | Pointer to the actual transaction object to wrap |
Definition at line 387 of file SQLiteDB.h.
References AddRef().
bool SQLite::Transaction::Close | ( | ) |
End the transaction (commiting it).
Definition at line 1112 of file SQLiteDB.cpp.
References SQLite::RealTransaction::Close(), and m_pReal.
bool SQLite::Transaction::Commit | ( | ) |
Commit the transaction.
Definition at line 1120 of file SQLiteDB.cpp.
References SQLite::RealTransaction::Commit(), and m_pReal.
bool SQLite::Transaction::Execute | ( | Statement & | statment | ) |
Execute a statement as a part of the transaction.
statment | SQL statement wrapper object to perform |
Definition at line 1146 of file SQLiteDB.cpp.
References SQLite::RealTransaction::Execute(), and m_pReal.
bool SQLite::Transaction::Execute | ( | const std::string & | sSQL | ) | [inline] |
Execute an SQL command as a part of the transaction.
sSQL | The statement to execute |
Definition at line 415 of file SQLiteDB.h.
References Execute().
Referenced by Execute().
bool SQLite::Transaction::Execute | ( | LPCTSTR | pSQL | ) |
Execute an SQL command as a part of the transaction.
pSQL | SQL statement to perform |
Definition at line 1137 of file SQLiteDB.cpp.
References SQLite::RealTransaction::Execute(), and m_pReal.
const std::tstring & SQLite::Transaction::GetLastError | ( | ) |
Retrieves the description of the last error found while performing the transaction.
Definition at line 1188 of file SQLiteDB.cpp.
References SQLite::RealTransaction::GetLastError(), and m_pReal.
virtual const Transaction& SQLite::Transaction::operator= | ( | const Transaction & | other | ) | [inline, virtual] |
Assignment operator.
other | The transaction wrapper object to copy |
Definition at line 439 of file SQLiteDB.h.
Run a SELECT statement as a part of the transaction.
statement | SQL query statement to perform |
Definition at line 1164 of file SQLiteDB.cpp.
References m_pReal, and SQLite::RealTransaction::Query().
Recordset SQLite::Transaction::Query | ( | const std::string & | sSQL | ) | [inline] |
Run query as a part of the transaction.
sSQL | The SQL query to perform |
Definition at line 425 of file SQLiteDB.h.
References Query().
Referenced by Query().
Recordset SQLite::Transaction::Query | ( | LPCTSTR | pSQL | ) |
Run query as a part of the transaction.
pSQL | SQL query to perform |
Definition at line 1155 of file SQLiteDB.cpp.
References m_pReal, and SQLite::RealTransaction::Query().
bool SQLite::Transaction::Rollback | ( | ) |
Rollback the transaction.
Definition at line 1128 of file SQLiteDB.cpp.
References m_pReal, and SQLite::RealTransaction::Rollback().