Skip to content

Commit

Permalink
Use WriteByte for single byte operations (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
moredure committed Mar 18, 2022
1 parent 0f8c265 commit 5156d7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgres.go
Expand Up @@ -108,7 +108,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 @@ -133,7 +133,7 @@ func (dialector Dialector) QuoteTo(writer clause.Writer, str string) {
if continuousBacktick > 0 && !selfQuoted {
writer.WriteString(`""`)
}
writer.WriteString(`"`)
writer.WriteByte('"')
}

var numericPlaceholder = regexp.MustCompile("\\$(\\d+)")
Expand Down

0 comments on commit 5156d7e

Please sign in to comment.