Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
y.output
.idea

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ go:
before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get github.com/xwb1989/sqlparser
- go get github.com/zssky/log
- go install golang.org/x/tools/cmd/goyacc

script:
Expand Down
20 changes: 20 additions & 0 deletions ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,23 @@ type DDL struct {
PartitionSpec *PartitionSpec
VindexSpec *VindexSpec
VindexCols []ColIdent
Trigger *Trigger
Definer *Definer
}

type Definer struct {
User string
Host string
}

type Trigger struct {
Name string // trigger name
IsBefore bool // is before or after
Event string // update, insert, delete
Table TableName // trigger table
Body []byte // trigger body
IsPrecede bool // is precede or follows
Related string // other trigger name
}

// DDL strings.
Expand All @@ -674,6 +691,9 @@ const (

// Vindex DDL param to specify the owner of a vindex
VindexOwnerStr = "owner"

// CREATE TRIGGER
CreateTriggerStr = "create trigger"
)

// Format formats the node.
Expand Down
Loading