1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
4
// RCS-ID: $Id: pgTrigger.h 4874 2006-01-06 17:33:27Z dpage $
5
// Copyright (C) 2002 - 2006, The pgAdmin Development Team
6
// This software is released under the Artistic Licence
8
// pgTrigger.h PostgreSQL Trigger
10
//////////////////////////////////////////////////////////////////////////
19
class pgTriggerFactory : public pgTableObjFactory
23
virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent);
24
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
26
extern pgTriggerFactory triggerFactory;
29
class pgTrigger : public pgTableObject
32
pgTrigger(pgTable *newTable, const wxString& newName = wxT(""));
35
void ShowTreeDetail(ctlTree *browser, frmMain *form=0, ctlListView *properties=0, ctlSQLBox *sqlPane=0);
36
bool CanDropCascaded() { return true; }
38
wxString GetFireWhen() const;
39
wxString GetEvent() const;
40
wxString GetForEach() const;
41
wxString GetFunction() const { return function; }
42
void iSetFunction(const wxString& s) { function=s; }
43
void iSetArguments(const wxString& s) { arguments=s; }
44
wxString GetArguments() const { return arguments; }
45
long GetTriggerType() const {return triggerType; }
46
void iSetTriggerType(const long l) { triggerType=l; }
47
bool GetEnabled() const { return enabled; }
48
void iSetEnabled(const bool b) {enabled=b; }
49
void iSetTriggerFunction(pgFunction *fkt) { triggerFunction=fkt; }
50
wxString GetQuotedFullTable() const { return quotedFullTable; }
51
void iSetQuotedFullTable(const wxString &s) { quotedFullTable=s; }
52
OID GetFunctionOid() const { return functionOid; }
53
void iSetFunctionOid(const OID d) { functionOid=d; }
57
bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
58
wxString GetSql(ctlTree *browser);
59
pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
62
wxString function, quotedFullTable, arguments;
66
pgFunction *triggerFunction;