dal::MySqlDataProvider Class Reference

#include <mysqldataprovider.h>

Inheritance diagram for dal::MySqlDataProvider:

dal::DataProvider List of all members.

Detailed Description

A MySQL Data Provider.

Definition at line 41 of file mysqldataprovider.h.

Public Member Functions

 MySqlDataProvider (void) throw ()
 Constructor.
 ~MySqlDataProvider (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

MYSQL * mDb
 the handle to the database connection


Constructor & Destructor Documentation

dal::MySqlDataProvider::MySqlDataProvider void   )  throw ()
 

Constructor.

dal::MySqlDataProvider::~MySqlDataProvider void   )  throw ()
 

Destructor.


Member Function Documentation

void dal::MySqlDataProvider::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::MySqlDataProvider::disconnect void   )  [virtual]
 

Close the connection to the database.

Exceptions:
DbDisconnectionFailure if unsuccessful disconnection.

Implements dal::DataProvider.

const RecordSet& dal::MySqlDataProvider::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::MySqlDataProvider::getDbBackend void   )  const throw () [virtual]
 

Get the name of the database backend.

Returns:
the database backend name.

Implements dal::DataProvider.


Member Data Documentation

MYSQL* dal::MySqlDataProvider::mDb [private]
 

the handle to the database connection

Definition at line 109 of file mysqldataprovider.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