MCPcopy Create free account
hub / github.com/PostHog/duckgres / needsArrayQuoting

Function needsArrayQuoting

server/conn_results.go:460–470  ·  view source on GitHub ↗

needsArrayQuoting returns true if a string value needs quoting inside a PostgreSQL array literal

(s string)

Source from the content-addressed store, hash-verified

458 parts = append(parts, fmt.Sprintf("%d mons", remMonths))
459 }
460 }
461 }
462 if iv.Days != 0 {
463 if iv.Days == 1 || iv.Days == -1 {
464 parts = append(parts, fmt.Sprintf("%d day", iv.Days))
465 } else {
466 parts = append(parts, fmt.Sprintf("%d days", iv.Days))
467 }
468 }
469 if iv.Micros != 0 || len(parts) == 0 {
470 micros := iv.Micros
471 neg := micros < 0
472 if neg {
473 micros = -micros

Callers 1

formatArrayValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected