forked from mirror/gorm
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{})
|
buff := bytes.NewBuffer([]byte{})
|
||||||
i := 0
|
i := 0
|
||||||
for pos := range str {
|
for pos, char := range str {
|
||||||
if str[pos] == '?' {
|
if str[pos] == '?' {
|
||||||
buff.WriteString(replacements[i])
|
buff.WriteString(replacements[i])
|
||||||
i++
|
i++
|
||||||
} else {
|
} else {
|
||||||
buff.WriteByte(str[pos])
|
buff.WriteRune(char)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue