MCPcopy Index your code
hub / github.com/lib/pq / appendArrayQuotedBytes

Function appendArrayQuotedBytes

array.go:758–773  ·  view source on GitHub ↗
(b, v []byte)

Source from the content-addressed store, hash-verified

756}
757
758func appendArrayQuotedBytes(b, v []byte) []byte {
759 b = append(b, '"')
760 for {
761 i := bytes.IndexAny(v, `"\`)
762 if i < 0 {
763 b = append(b, v...)
764 break
765 }
766 if i > 0 {
767 b = append(b, v[:i]...)
768 }
769 b = append(b, '\\', v[i])
770 v = v[i+1:]
771 }
772 return append(b, '"')
773}
774
775func appendValue(b []byte, v driver.Value) ([]byte, error) {
776 enc, err := encode(v, 0)

Callers 2

ValueMethod · 0.85
appendArrayElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…