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

« back to all changes in this revision

Viewing changes to pgadmin/db/pgSet.cpp

  • 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: pgSet.cpp 7046 2008-02-04 13:50:00Z dpage $
5
 
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
 
// This software is released under the Artistic Licence
 
4
// RCS-ID:      $Id: pgSet.cpp 7758 2009-03-26 20:49:59Z dpage $
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
7
7
//
8
8
// pgSet.cpp - PostgreSQL ResultSet class
9
9
//
191
191
    
192
192
    if (needColQuoting)
193
193
    {
194
 
        col = PQfnumber(res, (wxT("\"") + colname + wxT("\"")).mb_str(conv));
 
194
        wxString quotedColName = colname;
 
195
        quotedColName.Replace(wxT("\""), wxT("\"\""));
 
196
        col = PQfnumber(res, (wxT("\"") + quotedColName + wxT("\"")).mb_str(conv));
195
197
    }
196
198
    else
197
199
        col = PQfnumber(res, colname.mb_str(conv));
201
203
    return col;
202
204
}
203
205
 
 
206
bool pgSet::HasColumn(const wxString &colname) const
 
207
{
 
208
    if (needColQuoting)
 
209
    {
 
210
        wxString quotedColName = colname;
 
211
        quotedColName.Replace(wxT("\""), wxT("\"\""));
 
212
        return (PQfnumber(res, (wxT("\"") + quotedColName + wxT("\"")).mb_str(conv)) < 0 ? false : true);
 
213
    }
 
214
    else
 
215
        return (PQfnumber(res, colname.mb_str(conv)) < 0 ? false : true);
 
216
 
 
217
}
 
218
 
204
219
 
205
220
 
206
221
char *pgSet::GetCharPtr(const int col) const