Skip to content

Commit

Permalink
fix: show tables (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxy-lgtm authored Dec 3, 2023
1 parent b94486c commit e61a0a7
Show file tree
Hide file tree
Showing 4 changed files with 3,741 additions and 3,709 deletions.
6 changes: 6 additions & 0 deletions ast/dml.go
Original file line number Diff line number Diff line change
Expand Up @@ -2676,6 +2676,11 @@ func (n *ShowStmt) Restore(ctx *format.RestoreCtx) error {
ctx.WriteKeyWord("FULL ")
}
}
restoreOptExtended := func() {
if n.Extended {
ctx.WriteKeyWord("EXTENDED ")
}
}
restoreShowDatabaseNameOpt := func() {
if n.DBName != "" {
// FROM OR IN
Expand Down Expand Up @@ -2905,6 +2910,7 @@ func (n *ShowStmt) Restore(ctx *format.RestoreCtx) error {
case ShowCharset:
ctx.WriteKeyWord("CHARSET")
case ShowTables:
restoreOptExtended()
restoreOptFull()
ctx.WriteKeyWord("TABLES")
restoreShowDatabaseNameOpt()
Expand Down
Loading

0 comments on commit e61a0a7

Please sign in to comment.