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

« back to all changes in this revision

Viewing changes to src/include/pgTrigger.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: 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
7
 
//
8
 
// pgTrigger.h PostgreSQL Trigger
9
 
//
10
 
//////////////////////////////////////////////////////////////////////////
11
 
 
12
 
#ifndef PGTRIGGER_H
13
 
#define PGTRIGGER_H
14
 
 
15
 
#include "pgTable.h"
16
 
 
17
 
class pgFunction;
18
 
 
19
 
class pgTriggerFactory : public pgTableObjFactory
20
 
{
21
 
public:
22
 
    pgTriggerFactory();
23
 
    virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent);
24
 
    virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
25
 
};
26
 
extern pgTriggerFactory triggerFactory;
27
 
 
28
 
 
29
 
class pgTrigger : public pgTableObject
30
 
{
31
 
public:
32
 
    pgTrigger(pgTable *newTable, const wxString& newName = wxT(""));
33
 
    ~pgTrigger();
34
 
 
35
 
    void ShowTreeDetail(ctlTree *browser, frmMain *form=0, ctlListView *properties=0, ctlSQLBox *sqlPane=0);
36
 
    bool CanDropCascaded() { return true; }
37
 
 
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; }
54
 
 
55
 
    void SetDirty();
56
 
 
57
 
    bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
58
 
    wxString GetSql(ctlTree *browser);
59
 
    pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
60
 
 
61
 
private:
62
 
    wxString function, quotedFullTable, arguments;
63
 
    OID functionOid;
64
 
    long triggerType;
65
 
    bool enabled;
66
 
    pgFunction *triggerFunction;
67
 
};
68
 
 
69
 
#endif