MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / nullIfEmptyString

Function nullIfEmptyString

internal/identity/store.go:1476–1481  ·  view source on GitHub ↗

nullIfEmptyString returns nil interface when s is empty so the column is inserted as SQL NULL rather than ”. Keeps body columns distinguishable between "scrubbed" (NULL) and "empty body" once scrubbing is wired up.

(s string)

Source from the content-addressed store, hash-verified

1474// inserted as SQL NULL rather than ”. Keeps body columns distinguishable
1475// between "scrubbed" (NULL) and "empty body" once scrubbing is wired up.
1476func nullIfEmptyString(s string) interface{} {
1477 if s == "" {
1478 return nil
1479 }
1480 return s
1481}
1482
1483// --- HITL approval store helpers ---
1484

Callers 3

SetMessageScreeningMethod · 0.85
createInboundMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected