feat: reuse name (#6626)

This commit is contained in:
hjwblog.com 2023-10-10 14:45:48 +08:00 committed by GitHub
parent 2095d42b4c
commit 9d8a5bb208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 {