Webmaster  |  Imprint 
Platinum
Platinum C++ Framework
Main  |  License  |  Documentation  |  Download  |  Support 

Pt::Db Namespace Reference

Transparent Database Access. More...


Classes

class  IBlob
 Implementation base of Blob values. More...
class  BlobImpl
 Default Blob value implementation. More...
struct  BlobStaticInitializer
class  Blob
 Binary large objects. More...
class  Connection
 This class holds a Connection to a database. More...
class  AccessError
 This indicates that a resource could not be accessed. More...
class  IConnection
 Interface for database connection. More...
class  IStmtCacheConnection
 Interface for a statement cached connection. More...
class  IConnector
class  ICursor
class  IResult
 Interface for DB Values. More...
class  IRow
 Interface for DB Rows. More...
class  IStatement
class  IValue
 Interface for DB Values. More...
class  Result
class  Row
 Database Row class. More...
class  Statement
 Iterator for statements. More...
class  Transaction
class  Value
 Database Value class. More...

Functions

PT_DB_API Connection connect (const std::string &url)
 Establish a connection to a database.


Detailed Description

This module provides abstract access to sql-based databases. Backends exist for sqlite, postgresql and mysql. All classes and functions are in the namespace Db, which is nested in the Pt namespace.

Function Documentation

PT_DB_API Connection Pt::Db::connect ( const std::string &  url  ) 

The url is prefixed with a drivername followed by a colon and a driver- specific part. If the connection can't be established, an exception is thrown.

Examples:

        tntDb::Connection myConn = tntDb::connect("mysql:Db=DS2;user=web;passwd=web");
        tntDb::Connection pgConn = tntDb::connect("postgresql:Dbname=DS2 user=web passwd=web");

Parameters:
url the url of the database to connect to
Returns:
the established connection
Exceptions:
LogicError 
RuntimeError 

Copyright © 2003-2007 The Pt Development Team
Pt 1.0