We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1efd66a commit 7a4e784Copy full SHA for 7a4e784
sqle/cmd/scannerd/scanners/common/parse.go
@@ -46,7 +46,7 @@ func Parse(_ context.Context, sqlText string) ([]driverV2.Node, error) {
46
func clearComments(sqlText string) string {
47
// 将注释替换为一个空格,防止语句粘连
48
sqlText = regexp.MustCompile(`(?s)/\*.*?\*/`).ReplaceAllString(sqlText, " ")
49
- sqlText = regexp.MustCompile(`--.*`).ReplaceAllString(sqlText, "")
+ sqlText = regexp.MustCompile(`--.*`).ReplaceAllString(sqlText, " ")
50
// 去除结尾分号后的内容
51
idx := strings.Index(sqlText, ";")
52
if idx >= 0 {
0 commit comments