Skip to content

Commit

Permalink
Use WriteByte in case of single byte writing (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
moredure committed Mar 18, 2022
1 parent 2415f40 commit efbd061
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mysql.go
Expand Up @@ -256,7 +256,7 @@ func (dialector Dialector) QuoteTo(writer clause.Writer, str string) {
shiftDelimiter = 0
underQuoted = false
continuousBacktick = 0
writer.WriteString("`")
writer.WriteByte('`')
}
writer.WriteByte(v)
continue
Expand All @@ -281,7 +281,7 @@ func (dialector Dialector) QuoteTo(writer clause.Writer, str string) {
if continuousBacktick > 0 && !selfQuoted {
writer.WriteString("``")
}
writer.WriteString("`")
writer.WriteByte('`')
}

func (dialector Dialector) Explain(sql string, vars ...interface{}) string {
Expand Down

0 comments on commit efbd061

Please sign in to comment.