-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalter_trigger_statement.go
More file actions
63 lines (52 loc) · 1.8 KB
/
alter_trigger_statement.go
File metadata and controls
63 lines (52 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package ast
// AlterTriggerStatement represents an ALTER TRIGGER statement
type AlterTriggerStatement struct {
Name *SchemaObjectName
TriggerObject *TriggerObject
TriggerType string // "For", "After", "InsteadOf"
TriggerActions []*TriggerAction
Options []TriggerOptionType
WithAppend bool
IsNotForReplication bool
MethodSpecifier *MethodSpecifier
StatementList *StatementList
}
func (s *AlterTriggerStatement) statement() {}
func (s *AlterTriggerStatement) node() {}
// TriggerObject represents the object a trigger is associated with
type TriggerObject struct {
Name *SchemaObjectName
TriggerScope string // "Normal", "AllServer", "Database"
}
// TriggerAction represents a trigger action
type TriggerAction struct {
TriggerActionType string // "Insert", "Update", "Delete", "Event", etc.
EventTypeGroup *EventTypeContainer // For database/server events
}
// TriggerOptionType is the interface for trigger options
type TriggerOptionType interface {
triggerOption()
}
// TriggerOption represents a trigger option
type TriggerOption struct {
OptionKind string
OptionState string
}
func (o *TriggerOption) triggerOption() {}
// ExecuteAsClause represents an EXECUTE AS clause
type ExecuteAsClause struct {
ExecuteAsOption string // Caller, Self, Owner, or specific user
Principal ScalarExpression
}
// ExecuteAsTriggerOption represents an EXECUTE AS trigger option
type ExecuteAsTriggerOption struct {
OptionKind string // "ExecuteAsClause"
ExecuteAsClause *ExecuteAsClause
}
func (o *ExecuteAsTriggerOption) triggerOption() {}
// MethodSpecifier represents a CLR method specifier
type MethodSpecifier struct {
AssemblyName *Identifier
ClassName *Identifier
MethodName *Identifier
}