~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to src/include/pgIndex.h

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Enrici
  • Date: 2004-12-14 23:46:39 UTC
  • Revision ID: james.westby@ubuntu.com-20041214234639-tve0i5l49fq13jli
Tags: upstream-1.2.0
ImportĀ upstreamĀ versionĀ 1.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgAdmin III - PostgreSQL Tools
 
4
// RCS-ID:      $Id: pgIndex.h,v 1.24 2004/07/25 20:33:51 andreas Exp $
 
5
// Copyright (C) 2002 - 2004, The pgAdmin Development Team
 
6
// This software is released under the Artistic Licence
 
7
//
 
8
// pgIndex.h PostgreSQL Index
 
9
//
 
10
//////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#ifndef PGIndex_H
 
13
#define PGIndex_H
 
14
 
 
15
// wxWindows headers
 
16
#include <wx/wx.h>
 
17
 
 
18
// App headers
 
19
#include "pgAdmin3.h"
 
20
#include "pgObject.h"
 
21
#include "pgServer.h"
 
22
#include "pgDatabase.h"
 
23
 
 
24
class pgCollection;
 
25
 
 
26
class pgIndex : public pgSchemaObject
 
27
{
 
28
public:
 
29
    pgIndex(pgSchema *newSchema, const wxString& newName = wxT(""), int type=PG_INDEX);
 
30
    ~pgIndex();
 
31
 
 
32
    int GetIcon() { return PGICON_INDEX; }
 
33
    void ShowTreeDetail(wxTreeCtrl *browser, frmMain *form=0, ctlListView *properties=0, ctlSQLBox *sqlPane=0);
 
34
    void ShowStatistics(frmMain *form, ctlListView *statistics);
 
35
    static pgObject *ReadObjects(pgCollection *collection, wxTreeCtrl *browser, const wxString &restriction);
 
36
    static pgObject *ReadObjects(pgCollection *collection, wxTreeCtrl *browser);
 
37
 
 
38
    wxString GetProcArgs() const { return procArgs; }
 
39
    wxString GetQuotedTypedColumns() const { return quotedTypedColumns; }
 
40
    wxString GetTypedColumns() const { return typedColumns; }
 
41
    wxString GetOperatorClasses() const { return operatorClasses; }
 
42
    wxString GetQuotedColumns() const { return quotedColumns; }
 
43
    wxString GetColumns() const { return columns; }
 
44
 
 
45
    wxString GetColumnNumbers() const { return columnNumbers; }
 
46
    void iSetColumnNumbers(const wxString& s) { columnNumbers=s; }
 
47
    wxString GetConstraint() const { return constraint; }
 
48
    void iSetConstraint(const wxString& s) { constraint=s; }
 
49
    wxString GetIndexType() const { return indexType; }
 
50
    void iSetIndexType(const wxString& s) { indexType=s; }
 
51
    long GetColumnCount() const { return columnCount; }
 
52
    void iSetColumnCount(const long l) { columnCount=l; }
 
53
    bool GetIsUnique() const { return isUnique; }
 
54
    void iSetIsUnique(const bool b) { isUnique=b; }
 
55
    bool GetIsPrimary() const { return isPrimary; }
 
56
    void iSetIsPrimary(const bool b) { isPrimary=b; }
 
57
    bool GetIsClustered() const { return isClustered; }
 
58
    void iSetIsClustered(const bool b) { isClustered=b; }
 
59
    wxString GetIdxTable() const { return idxTable; }
 
60
    void iSetIdxTable(const wxString& s) { idxTable=s; }
 
61
    wxString GetIdxSchema() const { return idxSchema; }
 
62
    void iSetIdxSchema(const wxString& s) { idxSchema=s; }
 
63
    OID GetRelTableOid() const { return relTableOid; }
 
64
    void iSetRelTableOid(const OID d) { relTableOid=d; }
 
65
    wxString GetTablespace() const { return tablespace; };
 
66
    void iSetTablespace(const wxString& newVal) { tablespace = newVal; }
 
67
 
 
68
    wxString GetProcName() const { return procName; }
 
69
    void iSetProcName(const wxString& s) { procName=s; }
 
70
    wxString GetProcNamespace() const { return procNamespace; }
 
71
    void iSetProcNamespace(const wxString& s) { procNamespace=s; }
 
72
 
 
73
    bool GetDeferrable() const { return deferrable; }
 
74
    void iSetDeferrable(const bool b) { deferrable=b; }
 
75
    bool GetDeferred() const { return deferred; }
 
76
    void iSetDeferred(const bool b) { deferred=b; }
 
77
 
 
78
    void iSetOperatorClassList(const wxString& s) { operatorClassList=s; }
 
79
    void iSetProcArgTypeList(const wxString& s) { procArgTypeList=s; }
 
80
 
 
81
    bool DropObject(wxFrame *frame, wxTreeCtrl *browser);
 
82
    wxString GetCreate();
 
83
    bool CanRestore() { return true; }
 
84
    wxString GetSql(wxTreeCtrl *browser);
 
85
    pgObject *Refresh(wxTreeCtrl *browser, const wxTreeItemId item);
 
86
    bool CanMaintenance() { return true; }
 
87
 
 
88
protected:
 
89
    void ReadColumnDetails();
 
90
 
 
91
private:
 
92
    wxString columnNumbers, columns, quotedColumns, indexType, idxTable, idxSchema, constraint, tablespace;
 
93
    wxString procName, procNamespace, procArgs, procArgTypeList, typedColumns, quotedTypedColumns, operatorClasses, operatorClassList;
 
94
    long columnCount;
 
95
    bool isUnique, isPrimary, isClustered;
 
96
    bool deferrable, deferred;
 
97
    OID relTableOid;
 
98
};
 
99
 
 
100
 
 
101
 
 
102
#endif