1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
4
// RCS-ID: $Id: pgDomain.h 6930 2008-01-02 00:10:01Z dpage $
5
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
// This software is released under the Artistic Licence
8
// pgDomain.h PostgreSQL Domain
10
//////////////////////////////////////////////////////////////////////////
19
class pgDomainFactory : public pgSchemaObjFactory
23
virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent);
24
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
26
extern pgDomainFactory domainFactory;
29
class pgDomain : public pgSchemaObject
32
pgDomain(pgSchema *newSchema, const wxString& newName = wxT(""));
35
void ShowTreeDetail(ctlTree *browser, frmMain *form=0, ctlListView *properties=0, ctlSQLBox *sqlPane=0);
36
bool CanDropCascaded() { return GetSchema()->GetMetaType() != PGM_CATALOG; }
38
wxString GetBasetype() const { return basetype; }
39
void iSetBasetype(const wxString& s) { basetype = s; }
40
wxString GetQuotedBasetype() const { return quotedBasetype; }
41
void iSetQuotedBasetype(const wxString& s) { quotedBasetype = s; }
42
void iSetIsDup(bool b) { isDup = b; }
43
long GetLength() const { return length; }
44
void iSetLength(long l) { length=l; }
45
long GetPrecision() const { return precision; }
46
void iSetPrecision(long l) { precision = l; }
47
wxString GetCheck() const { return check; }
48
void iSetCheck(const wxString &s) { check=s; }
49
wxString GetDefault() const { return defaultVal; }
50
void iSetDefault(const wxString& s) { defaultVal = s; }
51
bool GetNotNull() const { return notNull; }
52
void iSetNotNull(bool b) { notNull = b; }
53
long GetDimensions() const { return dimensions; }
54
void iSetDimensions(long l) { dimensions=l; }
55
wxString GetDelimiter() const { return delimiter; }
56
void iSetDelimiter(const wxString& s) { delimiter = s; }
57
OID GetBasetypeOid() const { return basetypeOid; }
58
void iSetBasetypeOid(OID d) { basetypeOid = d; }
59
long GetTyplen() const { return typlen; }
60
void iSetTyplen(const long l) { typlen=l; }
61
long GetTypmod() const { return typmod; }
62
void iSetTypmod(const long l) { typmod=l; }
64
bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
65
wxString GetSql(ctlTree *browser);
66
pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
68
bool HasStats() { return false; }
69
bool HasDepends() { return true; }
70
bool HasReferences() { return true; }
73
wxString basetype, quotedBasetype, defaultVal, delimiter, check;
74
long length, precision, dimensions;