dal::SqLiteDataProvider Class Reference

#include <sqlitedataprovider.h>

Inheritance diagram for dal::SqLiteDataProvider:

dal::DataProvider List of all members.

Detailed Description

A SQLite Data Provider.

Definition at line 38 of file sqlitedataprovider.h.

Public Member Functions

 SqLiteDataProvider (void) throw ()
 Constructor.
 ~SqLiteDataProvider (void) throw ()
 Destructor.
DbBackends getDbBackend (void) const throw ()
 Get the name of the database backend.
void connect (const std::string &dbName, const std::string &userName, const std::string &password)
 Create a connection to the database.
const RecordSetexecSql (const std::string &sql, const bool refresh=false)
 Execute a SQL query.
void disconnect (void)
 Close the connection to the database.

Private Attributes

sqlite3 * mDb
 the handle to the database connection


Constructor & Destructor Documentation

dal::SqLiteDataProvider::SqLiteDataProvider void   )  throw ()
 

Constructor.

dal::SqLiteDataProvider::~SqLiteDataProvider void   )  throw ()
 

Destructor.


Member Function Documentation

void dal::SqLiteDataProvider::connect const std::string &  dbName,
const std::string &  userName,
const std::string &  password
[virtual]
 

Create a connection to the database.

Parameters:
dbName the database name.
userName the user name.
password the user password.
Exceptions:
DbConnectionFailure if unsuccessful connection.

Implements dal::DataProvider.

void dal::SqLiteDataProvider::disconnect void   )  [virtual]
 

Close the connection to the database.

Exceptions:
DbDisconnectionFailure if unsuccessful disconnection.

Implements dal::DataProvider.

const RecordSet& dal::SqLiteDataProvider::execSql const std::string &  sql,
const bool  refresh = false
[virtual]
 

Execute a SQL query.

Parameters:
sql the SQL query.
refresh if true, refresh the cache (default = false).
Returns:
a recordset.
Exceptions:
DbSqlQueryExecFailure if unsuccessful execution.
std::runtime_error if trying to query a closed database.

Implements dal::DataProvider.

DbBackends dal::SqLiteDataProvider::getDbBackend void   )  const throw () [virtual]
 

Get the name of the database backend.

Returns:
the database backend name.

Implements dal::DataProvider.


Member Data Documentation

sqlite3* dal::SqLiteDataProvider::mDb [private]
 

the handle to the database connection

Definition at line 106 of file sqlitedataprovider.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 30 15:39:19 2007 for TMW Server by  doxygen 1.3.9.1