pgtype/hstore.go: Remove unused quoteHstore{Element,Replacer}
These are unused. The code uses quoteArrayElement instead.
This commit is contained in:
committed by
Jack Christensen
parent
2a86501e86
commit
d8b38b28be
@@ -271,12 +271,6 @@ func (c HstoreCodec) DecodeValue(m *Map, oid uint32, format int16, src []byte) (
|
|||||||
return hstore, nil
|
return hstore, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var quoteHstoreReplacer = strings.NewReplacer(`\`, `\\`, `"`, `\"`)
|
|
||||||
|
|
||||||
func quoteHstoreElement(src string) string {
|
|
||||||
return `"` + quoteArrayReplacer.Replace(src) + `"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func quoteHstoreElementIfNeeded(src string) string {
|
func quoteHstoreElementIfNeeded(src string) string {
|
||||||
if src == "" || (len(src) == 4 && strings.ToLower(src) == "null") || strings.ContainsAny(src, ` {},"\=>`) {
|
if src == "" || (len(src) == 4 && strings.ToLower(src) == "null") || strings.ContainsAny(src, ` {},"\=>`) {
|
||||||
return quoteArrayElement(src)
|
return quoteArrayElement(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user