diff --git a/dialect/sql/builder.go b/dialect/sql/builder.go index 0eda2bcb7..10fa8605e 100644 --- a/dialect/sql/builder.go +++ b/dialect/sql/builder.go @@ -1684,7 +1684,7 @@ func (b *Builder) Quote(ident string) string { // if it was quoted with the wrong // identifier character. if strings.Contains(ident, "`") { - return strings.ReplaceAll(ident, "`", `"`) + return strings.Replace(ident, "`", `"`, -1) } return strconv.Quote(ident) // an identifier for unknown dialect. @@ -1714,7 +1714,7 @@ func (b *Builder) Ident(s string) *Builder { case (isFunc(s) || isModifier(s)) && b.postgres(): // modifiers and aggregation functions that // were called without dialect information. - b.WriteString(strings.ReplaceAll(s, "`", `"`)) + b.WriteString(strings.Replace(s, "`", `"`, -1)) default: b.WriteString(s) }