PostgresContext Class Reference

PostgreSQL module. More...

#include <postgresxx.hpp>

Inheritance diagram for PostgresContext:

SqlDatabase List of all members.

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 &)

Detailed Description

PostgreSQL module.

Definition at line 36 of file postgresxx.hpp.


Constructor & Destructor Documentation

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.

Parameters:
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 (  ) 

Destructor.

Definition at line 60 of file postgresxx.cpp.

References close().


Member Function Documentation

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.

Returns:
The version as a string.

Implements SqlDatabase.

Definition at line 80 of file postgresxx.cpp.


Friends And Related Function Documentation

SqlResult SqlQuery::operator() ( const string &   )  [friend]


The documentation for this class was generated from the following files:
Generated on Sat Aug 18 16:21:45 2007 for SqlWrapperXX by  doxygen 1.5.0