#include <postgresxx.hpp>
Inheritance diagram for PostgresContext:

Public Member Functions | |
| PostgresContext (const string &dbName="", const string &user="", const string &passwd="", const string &host="localhost", const int port=0, const string &unixSocket="", const unsigned long clientFlags=0) | |
| Constructor. | |
| ~PostgresContext () | |
| Destructor. | |
| void | close () |
| Close connection. | |
| string | escapeString (const string &original) const |
| string | version () const |
| Version information. | |
Friends | |
| SqlResult | SqlQuery::operator() (const string &) |
Definition at line 36 of file postgresxx.hpp.
| PostgresContext::PostgresContext | ( | const string & | dbName = "", |
|
| const string & | user = "", |
|||
| const string & | passwd = "", |
|||
| const string & | host = "localhost", |
|||
| const int | port = 0, |
|||
| const string & | unixSocket = "", |
|||
| const unsigned long | clientFlags = 0 | |||
| ) |
Constructor.
Automatically open a connection to the database. If you don't give it the information it needs, thus failing, it will throw an exception.
| dbName | The name of the database. | |
| user | The user name for connecting to the database. | |
| passwd | The password for said user. | |
| host | The hostname of the server. If you don't specify anything, 'localhost' is used by default. | |
| port | Specify if your server uses a non-standard port. | |
| unixSocket | Can be specified for local connection where networking is not used. | |
| clientFlags | Options sent to the server concerning this session. |
Definition at line 33 of file postgresxx.cpp.
| PostgresContext::~PostgresContext | ( | ) |
| void PostgresContext::close | ( | ) | [virtual] |
Close connection.
This will close and clean up the database connection, including freeing memory. Note: It does not delete the SqlDatabase object itself.
Implements SqlDatabase.
Definition at line 65 of file postgresxx.cpp.
Referenced by ~PostgresContext().
| string PostgresContext::escapeString | ( | const string & | original | ) | const |
Definition at line 73 of file postgresxx.cpp.
| string PostgresContext::version | ( | ) | const [virtual] |
Version information.
Get the version information of the underlying API library, not the version of SqlWrapperXX.
Implements SqlDatabase.
Definition at line 80 of file postgresxx.cpp.
| SqlResult SqlQuery::operator() | ( | const string & | ) | [friend] |
1.5.0