~ubuntu-branches/debian/squeeze/pgadmin3/squeeze

« back to all changes in this revision

Viewing changes to pgadmin/include/debugger/dbgResultset.h

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Porcheron
  • Date: 2008-02-07 00:56:22 UTC
  • mto: (2.1.6 hardy) (6.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080207005622-c2ail8p4d0sk3dnw
Tags: upstream-1.8.2
ImportĀ upstreamĀ versionĀ 1.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgAdmin III - PostgreSQL Tools
 
4
// RCS-ID:      $Id: dbgResultset.h 6202 2007-04-18 11:22:49Z dpage $
 
5
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
 
6
// This software is released under the Artistic Licence
 
7
//
 
8
// dbgResultset.h - debugger 
 
9
//
 
10
//////////////////////////////////////////////////////////////////////////
 
11
 
 
12
////////////////////////////////////////////////////////////////////////////////
 
13
// class dbgResultset
 
14
//
 
15
//      A dbgResultset object encapsulates a result set produced by executing a 
 
16
//  database command. This class is a wrapper around a PGresult handle that 
 
17
//      provides a few convenient member functions.  
 
18
//
 
19
////////////////////////////////////////////////////////////////////////////////
 
20
 
 
21
#ifndef DBGRESULTSET_H
 
22
#define DBGRESULTSET_H
 
23
 
 
24
#include <libpq-fe.h>
 
25
 
 
26
class dbgResultset
 
27
{
 
28
public:
 
29
        dbgResultset( PGresult * handle );
 
30
 
 
31
        const char      *getRawErrorMessage();  // Return error message as a char *
 
32
        const wxString getErrorMessage();       // Return error message as a wxString
 
33
        const wxString getString(int column, int row = 0);
 
34
        const wxString getString(const wxString &columnName, int row = 0);
 
35
        long    getLong(int column, int row = 0);
 
36
        long    getLong(const wxString &columnName, int row = 0);
 
37
        bool    getBool(int column, int row = 0);
 
38
        bool    getBool(const wxString &columnName, int row = 0);
 
39
        int     getRowCount() { return(PQntuples( m_handle)); }
 
40
    bool        columnExists(const wxString &columnname);
 
41
 
 
42
        ExecStatusType getCommandStatus();
 
43
 
 
44
private:
 
45
 
 
46
        PGresult *m_handle;
 
47
 
 
48
};
 
49
#endif