diff options
Diffstat (limited to 'src/interfaces/libpq++/pgconnection.h')
| -rw-r--r-- | src/interfaces/libpq++/pgconnection.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/interfaces/libpq++/pgconnection.h b/src/interfaces/libpq++/pgconnection.h index 1c5be0f588..0a19359a9f 100644 --- a/src/interfaces/libpq++/pgconnection.h +++ b/src/interfaces/libpq++/pgconnection.h @@ -13,13 +13,13 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pgconnection.h,v 1.6 2000/04/14 01:00:16 tgl Exp $ + * $Id: pgconnection.h,v 1.7 2000/04/22 22:39:15 tgl Exp $ * *------------------------------------------------------------------------- */ -#ifndef PGCONN_H -#define PGCONN_H +#ifndef PGCONNECTION_H +#define PGCONNECTION_H extern "C" { #include "config.h" @@ -57,13 +57,13 @@ using namespace std; // derived from this class to obtain the connection interface. class PgConnection { protected: - PGconn* pgConn; // Connection Structures - PGresult* pgResult; // Query Result - int pgCloseConnection; // Flag indicating whether the connection should be closed or not + PGconn* pgConn; // Connection Structure + PGresult* pgResult; // Current Query Result + int pgCloseConnection; // TRUE if connection should be closed by destructor public: PgConnection(const char* conninfo); // use reasonable & environment defaults - ~PgConnection(); // close connection and clean up + virtual ~PgConnection(); // close connection and clean up // Connection status and error messages ConnStatusType Status(); @@ -82,9 +82,14 @@ public: protected: ConnStatusType Connect(const char* conninfo); string IntToString(int); - -protected: + // 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&); }; -#endif // PGCONN_H +#endif // PGCONNECTION_H |
