Support for UTF8 names on DB (#1793)

This commit is contained in:
Saúl Ortega 2018-03-15 09:35:31 -05:00 committed by Jinzhu
parent 6ed508ec6a
commit 52c5c8127c
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}