Skip to content

Commit

Permalink
feat: reuse name (#6626)
Browse files Browse the repository at this point in the history
  • Loading branch information
philhuan authored Oct 10, 2023
1 parent 2095d42 commit 9d8a5bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clause/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (expr NamedExpr) Build(builder Builder) {
for _, v := range []byte(expr.SQL) {
if v == '@' && !inName {
inName = true
name = []byte{}
name = name[:0]
} else if v == ' ' || v == ',' || v == ')' || v == '"' || v == '\'' || v == '`' || v == '\r' || v == '\n' || v == ';' {
if inName {
if nv, ok := namedMap[string(name)]; ok {
Expand Down

0 comments on commit 9d8a5bb

Please sign in to comment.