tntdb::postgresql::Connection Class Reference

Implements a connection to a PostgreSQL database. More...

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

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

Public Member Functions

 Connection (const char *conninfo)
 ~Connection ()
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)
PGconn * getPGConn () const
unsigned getNextStmtNumber ()
void deallocateStatement (const std::string &stmtName)
void deallocateStatements ()
- 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 PostgreSQL database.

Constructor & Destructor Documentation

tntdb::postgresql::Connection::Connection ( const char *  conninfo)
explicit
tntdb::postgresql::Connection::~Connection ( )

Member Function Documentation

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

void tntdb::postgresql::Connection::deallocateStatement ( const std::string &  stmtName)
void tntdb::postgresql::Connection::deallocateStatements ( )
size_type tntdb::postgresql::Connection::execute ( const std::string &  query)
virtual

Implements tntdb::IConnection.

unsigned tntdb::postgresql::Connection::getNextStmtNumber ( )
inline
PGconn* tntdb::postgresql::Connection::getPGConn ( ) const
inline
long tntdb::postgresql::Connection::lastInsertId ( const std::string &  name)
virtual

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.

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

Implements tntdb::IConnection.


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