Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MCDBConnection Class Reference

Representation of a database connection. More...

#include <mcllib/db/MCDBConnection.h>

Inheritance diagram for MCDBConnection:

MCBase List of all members.

Public Member Functions

void commit ()
 Commit the current transaction.
MCSqlStatement createStatement ()
 Obtain a statement from the connection.
void deleteTable (const mcllib::MCString &tableName)
 Delete a table.
bool existsTable (const mcllib::MCString &tableName)
 Return true if the table exists.
bool getAutoCommit () const
 Query the current auto commit mode.
MCDBConnectionMetaData getMetaData () const
 Get meta data for the connection.
 MCDBConnection ()
 Create a unconnected connection.
void rollback ()
 Rollback the current transaction.
void setAutoCommit (bool autoCommit)
 Set auto commit mode.
void truncateTable (const mcllib::MCString &tableName)
 Truncate a table.
 ~MCDBConnection ()
 Destruct the connection, freeing any resources.


class MCDBDriver

Detailed Description

Representation of a database connection.

The underlying database connection does not get closed until all dependent transactions and statements go out of scope.

Member Function Documentation

MCSqlStatement createStatement  ) 

Obtain a statement from the connection.

Statements are used to execute queries against the database connection.

void setAutoCommit bool  autoCommit  ) 

Set auto commit mode.

If autoCommit is true then changes are committed to the database after each statement is executed.

void truncateTable const mcllib::MCString tableName  ) 

Truncate a table.

Truncating a table deletes all rows in the table as efficiently as possible.

Generated on Wed Jan 12 19:05:51 2005 for MCLLIB by  doxygen