Skip to content

Commit

Permalink
feat: reuse name
Browse files Browse the repository at this point in the history
  • Loading branch information
philhuan committed Oct 8, 2023
1 parent e57e5d8 commit 8cd1951
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 8cd1951

Please sign in to comment.