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. | |
| 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");
| url | the url of the database to connect to |
| LogicError | ||
| RuntimeError |