mirror of https://github.com/go-gorm/gorm.git
feat: reuse name (#6626)
This commit is contained in:
parent
2095d42b4c
commit
9d8a5bb208
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue