diff options
| author | Marc G. Fournier | 2002-08-22 00:15:14 +0000 |
|---|---|---|
| committer | Marc G. Fournier | 2002-08-22 00:15:14 +0000 |
| commit | da4683fbe1cba48cf5b5b29055b66e0bacb00162 (patch) | |
| tree | 87834b1b18614313e895dcc8c504f58af9f6b4b2 /src/interfaces/libpq++/pgconnection.h | |
| parent | b663f3443ba096a06970214c3e83e79f6e570b84 (diff) | |
Okay, libpq++ is moved to GBorg, and all traces of it have been removed
from the core repository ... I haven't *moved* the libpq++ files out of the
tree, mainly as we want to keep them in place for past branches ...
Peter, I think I've covered all the files I need, and re-ran autoconf to make
sure the configure file is in place properly ...
Diffstat (limited to 'src/interfaces/libpq++/pgconnection.h')
| -rw-r--r-- | src/interfaces/libpq++/pgconnection.h | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/src/interfaces/libpq++/pgconnection.h b/src/interfaces/libpq++/pgconnection.h deleted file mode 100644 index 01878cdde16..00000000000 --- a/src/interfaces/libpq++/pgconnection.h +++ /dev/null @@ -1,106 +0,0 @@ -/*------------------------------------------------------------------------- -* -* pgconnection.h -* -* -* DESCRIPTION -* Postgres Connection Class: -* Manage Postgres backend connection -* -* NOTES -* Currently under construction. -* -* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group -* Portions Copyright (c) 1994, Regents of the University of California -* -* $Id: pgconnection.h,v 1.19 2002/07/02 16:32:19 momjian Exp $ -* -*------------------------------------------------------------------------- -*/ - -#ifndef PGCONNECTION_H -#define PGCONNECTION_H - -extern "C" -{ -#include "pg_config.h" -} - -/* We assume that the C++ compiler will have these keywords, even though - * pg_config.h may have #define'd them to empty because the C compiler doesn't. - */ -#undef const -#undef inline -#undef signed -#undef volatile - -#ifdef HAVE_CXX_STRING_HEADER -#include <string> -#endif - -extern "C" -{ -#include "libpq-fe.h" -} - -#ifdef HAVE_NAMESPACE_STD -#define PGSTD std:: -#else -#define PGSTD -#endif - - -// **************************************************************** -// -// PgConnection - a connection made to a postgres backend -// -// **************************************************************** -// This class contains all the information about the connection -// to the backend process. All the database classes should be -// derived from this class to obtain the connection interface. -class DLLIMPORT PgConnection -{ -protected: - PGconn* pgConn; // Connection Structure - PGresult* pgResult; // Current Query Result - bool pgCloseConnection; // true if connection should be closed by destructor - -public: - explicit PgConnection(const char* conninfo); // use reasonable & environment defaults - virtual ~PgConnection(); // close connection and clean up - - // Connection status and error messages - ConnStatusType Status() const; - bool ConnectionBad() const; - const char* ErrorMessage() const; - - // returns the database name of the connection - const char* DBName() const; - - // Query Execution interface - ExecStatusType Exec(const char* query); // send a query to the backend - int ExecCommandOk(const char* query); // send a command and check if it's OK - int ExecTuplesOk(const char* query); // send a command and check if tuples are returned - PGnotify* Notifies(); - - // set the notice processor - PQnoticeProcessor SetNoticeProcessor(PQnoticeProcessor proc, void *arg); - -protected: - ConnStatusType Connect(const char* conninfo); - void CloseConnection(); - static PGSTD string IntToString(int); - // Default constructor is only available to subclasses - PgConnection(); - -private: - // We don't support copying of PgConnection objects, - // so make copy constructor and assignment op private. - PgConnection(const PgConnection&); - PgConnection& operator= (const PgConnection&); -}; - - -#undef PGSTD - -#endif // PGCONNECTION_H |
