Skip to content

Commit

Permalink
Fix:sql has @variable (go-gorm#302)
Browse files Browse the repository at this point in the history
* fix:sql has @variable

* fix:sql has @variable
  • Loading branch information
idersec authored Dec 17, 2021
1 parent a3087e7 commit a80c46d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/check/checkinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ func (m *InterfaceMethod) sqlStateCheckAndSplit() error {
break
}
}
case '\\':
if sqlString[i+1] == '@' {
i++
buf.WriteSql(sqlString[i])
continue
}
buf.WriteSql(b)
case '{', '@':
if sqlClause := buf.Dump(); strings.TrimSpace(sqlClause) != "" {
m.Sections.members = append(m.Sections.members, section{
Expand Down

0 comments on commit a80c46d

Please sign in to comment.