2
0

pgtype/hstore.go: Remove unused quoteHstore{Element,Replacer}

These are unused. The code uses quoteArrayElement instead.
This commit is contained in:
Evan Jones
2023-05-12 09:07:21 -04:00
committed by Jack Christensen
parent 2a86501e86
commit d8b38b28be
-6
View File
@@ -271,12 +271,6 @@ func (c HstoreCodec) DecodeValue(m *Map, oid uint32, format int16, src []byte) (
return hstore, nil
}
var quoteHstoreReplacer = strings.NewReplacer(`\`, `\\`, `"`, `\"`)
func quoteHstoreElement(src string) string {
return `"` + quoteArrayReplacer.Replace(src) + `"`
}
func quoteHstoreElementIfNeeded(src string) string {
if src == "" || (len(src) == 4 && strings.ToLower(src) == "null") || strings.ContainsAny(src, ` {},"\=>`) {
return quoteArrayElement(src)