Skip to content

Commit

Permalink
Support for UTF8 names on DB (go-gorm#1793)
Browse files Browse the repository at this point in the history
  • Loading branch information
saulortega authored and jinzhu committed Mar 15, 2018
1 parent 6ed508e commit 52c5c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 52c5c81

Please sign in to comment.