Skip to content

Commit

Permalink
support default keyword for attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Jul 22, 2021
1 parent 71ce654 commit a8bb32c
Show file tree
Hide file tree
Showing 4 changed files with 4,084 additions and 4,030 deletions.
5 changes: 5 additions & 0 deletions ast/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3694,11 +3694,16 @@ type AttributesSpec struct {
node

Attributes string
Default bool
}

func (n *AttributesSpec) Restore(ctx *format.RestoreCtx) error {
ctx.WriteKeyWord("ATTRIBUTES")
ctx.WritePlain("=")
if n.Default {
ctx.WriteKeyWord("DEFAULT")
return nil
}
ctx.WriteString(n.Attributes)
return nil
}
Expand Down
Loading

0 comments on commit a8bb32c

Please sign in to comment.