tntdb::mysql::Connection Class Reference

Implements a connection to a Mysql database. More...

#include <tntdb/mysql/impl/connection.h>

Inheritance diagram for tntdb::mysql::Connection:
tntdb::IStmtCacheConnection tntdb::IConnection cxxtools::SimpleRefCounted

Public Member Functions

 Connection (const char *conn)
 Connection (const char *app, const char *host, const char *user, const char *passwd, const char *db, unsigned int port=3306, const char *unix_socket=0, unsigned long client_flag=0)
 ~Connection ()
MYSQL * getHandle ()
void beginTransaction ()
void commitTransaction ()
void rollbackTransaction ()
size_type execute (const std::string &query)
tntdb::Result select (const std::string &query)
tntdb::Row selectRow (const std::string &query)
tntdb::Value selectValue (const std::string &query)
tntdb::Statement prepare (const std::string &query)
tntdb::Statement prepareWithLimit (const std::string &query, const std::string &limit, const std::string &offset)
bool ping ()
long lastInsertId (const std::string &name)
void lockTable (const std::string &tablename, bool exclusive)
- Public Member Functions inherited from tntdb::IStmtCacheConnection
virtual Statement prepareCached (const std::string &query, const std::string &key)
virtual Statement prepareCachedWithLimit (const std::string &query, const std::string &limit, const std::string &offset, const std::string &key)
virtual void clearStatementCache ()
virtual bool clearStatementCache (const std::string &key)

Additional Inherited Members

- Public Types inherited from tntdb::IConnection
typedef unsigned size_type

Detailed Description

Implements a connection to a Mysql database.

Constructor & Destructor Documentation

tntdb::mysql::Connection::Connection ( const char *  conn)
explicit
tntdb::mysql::Connection::Connection ( const char *  app,
const char *  host,
const char *  user,
const char *  passwd,
const char *  db,
unsigned int  port = 3306,
const char *  unix_socket = 0,
unsigned long  client_flag = 0 
)
tntdb::mysql::Connection::~Connection ( )

Member Function Documentation

void tntdb::mysql::Connection::beginTransaction ( )
virtual

Implements tntdb::IConnection.

void tntdb::mysql::Connection::commitTransaction ( )
virtual

Implements tntdb::IConnection.

size_type tntdb::mysql::Connection::execute ( const std::string &  query)
virtual

Implements tntdb::IConnection.

MYSQL* tntdb::mysql::Connection::getHandle ( )
inline
long tntdb::mysql::Connection::lastInsertId ( const std::string &  name)
virtual

Implements tntdb::IConnection.

void tntdb::mysql::Connection::lockTable ( const std::string &  tablename,
bool  exclusive 
)
virtual

Implements tntdb::IConnection.

bool tntdb::mysql::Connection::ping ( )
virtual

Implements tntdb::IConnection.

tntdb::Statement tntdb::mysql::Connection::prepare ( const std::string &  query)
virtual

Implements tntdb::IConnection.

tntdb::Statement tntdb::mysql::Connection::prepareWithLimit ( const std::string &  query,
const std::string &  limit,
const std::string &  offset 
)
virtual

Implements tntdb::IConnection.

void tntdb::mysql::Connection::rollbackTransaction ( )
virtual

Implements tntdb::IConnection.

tntdb::Result tntdb::mysql::Connection::select ( const std::string &  query)
virtual

Implements tntdb::IConnection.

tntdb::Row tntdb::mysql::Connection::selectRow ( const std::string &  query)
virtual

Implements tntdb::IConnection.

tntdb::Value tntdb::mysql::Connection::selectValue ( const std::string &  query)
virtual

Implements tntdb::IConnection.


The documentation for this class was generated from the following file: