mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
dialect/sql: remove Go1.13 specific features
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/205 Reviewed By: alexsn Differential Revision: D18742422 fbshipit-source-id: 1e1996fe26787788e4c0466a58884b4fa0581353
This commit is contained in:
committed by
Facebook Github Bot
parent
f7ce61fc3c
commit
29c7b0a0d8
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user