mirror of https://github.com/go-gorm/gorm.git
Support for UTF8 names on DB (#1793)
This commit is contained in:
parent
6ed508ec6a
commit
52c5c8127c
4
scope.go
4
scope.go
|
@ -692,12 +692,12 @@ func (scope *Scope) buildSelectQuery(clause map[string]interface{}) (str string)
|
|||
|
||||
buff := bytes.NewBuffer([]byte{})
|
||||
i := 0
|
||||
for pos := range str {
|
||||
for pos, char := range str {
|
||||
if str[pos] == '?' {
|
||||
buff.WriteString(replacements[i])
|
||||
i++
|
||||
} else {
|
||||
buff.WriteByte(str[pos])
|
||||
buff.WriteRune(char)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue