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

Function quoteCompositeFieldIfNeeded

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

Source from the content-addressed store, hash-verified

584}
585
586func quoteCompositeFieldIfNeeded(src string) string {
587 if src == "" || src[0] == ' ' || src[len(src)-1] == ' ' || strings.ContainsAny(src, `(),"\`) {
588 return quoteCompositeField(src)
589 }
590 return src
591}
592
593// CompositeFields represents the values of a composite value. It can be used as an encoding source or as a scan target.
594// It cannot scan a NULL, but the composite fields can be NULL.

Callers 1

AppendValueMethod · 0.85

Calls 1

quoteCompositeFieldFunction · 0.85

Tested by

no test coverage detected