1
//////////////////////////////////////////////////////////////////////////
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
8
// pgIndex.h PostgreSQL Index
10
//////////////////////////////////////////////////////////////////////////
22
#include "pgDatabase.h"
26
class pgIndex : public pgSchemaObject
29
pgIndex(pgSchema *newSchema, const wxString& newName = wxT(""), int type=PG_INDEX);
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);
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; }
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; }
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; }
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; }
78
void iSetOperatorClassList(const wxString& s) { operatorClassList=s; }
79
void iSetProcArgTypeList(const wxString& s) { procArgTypeList=s; }
81
bool DropObject(wxFrame *frame, wxTreeCtrl *browser);
83
bool CanRestore() { return true; }
84
wxString GetSql(wxTreeCtrl *browser);
85
pgObject *Refresh(wxTreeCtrl *browser, const wxTreeItemId item);
86
bool CanMaintenance() { return true; }
89
void ReadColumnDetails();
92
wxString columnNumbers, columns, quotedColumns, indexType, idxTable, idxSchema, constraint, tablespace;
93
wxString procName, procNamespace, procArgs, procArgTypeList, typedColumns, quotedTypedColumns, operatorClasses, operatorClassList;
95
bool isUnique, isPrimary, isClustered;
96
bool deferrable, deferred;