~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/include/db/pgConn.h

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
 
// RCS-ID:      $Id: pgConn.h 7215 2008-04-04 12:28:00Z dpage $
5
 
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
 
// This software is released under the Artistic Licence
 
4
// RCS-ID:      $Id: pgConn.h 7819 2009-04-24 11:49:06Z mha $
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
7
7
//
8
8
// pgConn.h - PostgreSQL Connection class
9
9
//
87
87
    bool HasPrivilege(const wxString &objTyp, const wxString &objName, const wxString &priv);
88
88
    bool HasFeature(int feature=0);
89
89
    bool BackendMinimumVersion(int major, int minor);
 
90
    bool BackendMinimumVersion(int major, int minor, int patch);
90
91
    bool EdbMinimumVersion(int major, int minor);
91
92
    wxString SystemNamespaceRestriction(const wxString &nsp);
92
93
    int GetMajorVersion() const { return majorVersion; }
93
94
    int GetMinorVersion() const { return minorVersion; }
94
95
    bool GetIsEdb();
 
96
    bool GetIsGreenplum();
95
97
    wxString EncryptPassword(const wxString &user, const wxString &password);
96
 
        wxString qtDbString(const wxString& value);
97
 
        pgConn *Duplicate();
 
98
    wxString qtDbString(const wxString& value);
 
99
    pgConn *Duplicate();
98
100
 
99
101
    static void ExamineLibpqVersion();
100
102
    static double GetLibpqVersion() { return libpqVersion; }
106
108
    wxString GetUser() const { return wxString(PQuser(conn), *conv); }
107
109
    wxString GetPassword() const { return wxString(PQpass(conn), *conv); }
108
110
    wxString GetHost() const { return dbHost; }
 
111
    wxString GetHostName() const { return dbHostName; }
 
112
    wxString GetHostAddress() const { return dbHostAddress; }
109
113
    wxString GetDbname() const { return dbname; }
110
 
        wxString GetName() const;
 
114
    wxString GetName() const;
111
115
    bool GetNeedUtfConnectString() { return utfConnectString; }
112
116
    int GetPort() const { return atoi(PQport(conn)); };
113
117
    wxString GetTTY() const { return wxString(PQtty(conn), *conv); }
114
118
    wxString GetOptions() const { return wxString(PQoptions(conn), *conv); }
115
119
    int GetSslMode() const { return save_sslmode; }
 
120
    wxString GetSslModeName();
116
121
    int GetBackendPID() const { return PQbackendPID(conn); }
117
122
    int GetStatus() const;
118
123
    int GetLastResultStatus() const { return lastResultStatus; }
133
138
    pgNotification *GetNotification();
134
139
    int GetTxStatus();
135
140
 
 
141
    bool TableHasColumn(wxString schemaname, wxString tblname, const wxString& colname);
 
142
 
136
143
protected:
137
144
    PGconn *conn;
138
145
    int lastResultStatus;
139
146
 
140
147
    int connStatus;
141
148
 
142
 
    void SetLastResultError(PGresult *res);
 
149
    void SetLastResultError(PGresult *res, const wxString &msg = wxEmptyString);
143
150
    pgError lastResultError;
144
151
 
145
152
    wxMBConv *conv;
146
153
    bool needColQuoting, utfConnectString;
147
 
    wxString dbHost, dbname;
 
154
    wxString dbHost, dbHostName, dbHostAddress, dbname;
148
155
    OID lastSystemOID;
149
156
    OID dbOid;
150
157
 
156
163
 
157
164
private:
158
165
    wxString qtString(const wxString& value);
159
 
    
 
166
 
160
167
    bool features[32];
161
 
    int minorVersion, majorVersion;
 
168
    int minorVersion, majorVersion, patchVersion;
162
169
    bool isEdb;
 
170
    bool isGreenplum;
163
171
 
164
172
    wxString reservedNamespaces;
165
173
 
166
 
        wxString save_server, save_database, save_username, save_password;
167
 
        int save_port, save_sslmode;
168
 
        OID save_oid;
 
174
    wxString save_server, save_database, save_username, save_password;
 
175
    int save_port, save_sslmode;
 
176
    OID save_oid;
169
177
};
170
178
 
171
179
#endif
172
180
 
 
181