MCPcopy
hub / github.com/jackc/pgx / quoteCompositeField

Function quoteCompositeField

pgtype/composite.go:582–584  ·  view source on GitHub ↗
(src string)

Source from the content-addressed store, hash-verified

580var quoteCompositeReplacer = strings.NewReplacer(`\`, `\\`, `"`, `\"`)
581
582func quoteCompositeField(src string) string {
583 return `"` + quoteCompositeReplacer.Replace(src) + `"`
584}
585
586func quoteCompositeFieldIfNeeded(src string) string {
587 if src == "" || src[0] == ' ' || src[len(src)-1] == ' ' || strings.ContainsAny(src, `(),"\`) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected