Skip to content

Commit 731df3c

Browse files
committed
comments
1 parent 88c73c0 commit 731df3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

go/sql/parser.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ var (
1717
dropColumnRegexp = regexp.MustCompile(`(?i)\bdrop\s+(column\s+|)([\S]+)$`)
1818
renameTableRegexp = regexp.MustCompile(`(?i)\brename\s+(to|as)\s+`)
1919
alterTableExplicitSchemaTableRegexps = []*regexp.Regexp{
20+
// ALTER TABLE `scm`.`tbl` something
2021
regexp.MustCompile(`(?i)\balter\s+table\s+` + "`" + `([^` + "`" + `]+)` + "`" + `[.]` + "`" + `([^` + "`" + `]+)` + "`" + `\s+(.*$)`),
22+
// ALTER TABLE `scm`.tbl something
2123
regexp.MustCompile(`(?i)\balter\s+table\s+` + "`" + `([^` + "`" + `]+)` + "`" + `[.]([\S]+)\s+(.*$)`),
24+
// ALTER TABLE scm.`tbl` something
2225
regexp.MustCompile(`(?i)\balter\s+table\s+([\S]+)[.]` + "`" + `([^` + "`" + `]+)` + "`" + `\s+(.*$)`),
26+
// ALTER TABLE scm.tbl something
2327
regexp.MustCompile(`(?i)\balter\s+table\s+([\S]+)[.]([\S]+)\s+(.*$)`),
2428
}
2529
alterTableExplicitTableRegexps = []*regexp.Regexp{
30+
// ALTER TABLE `tbl` something
2631
regexp.MustCompile(`(?i)\balter\s+table\s+` + "`" + `([^` + "`" + `]+)` + "`" + `\s+(.*$)`),
32+
// ALTER TABLE tbl something
2733
regexp.MustCompile(`(?i)\balter\s+table\s+([\S]+)\s+(.*$)`),
2834
}
2935
)

0 commit comments

Comments
 (0)