MCPcopy Create free account
hub / github.com/compozy/agh / nullStringForEmpty

Function nullStringForEmpty

internal/memory/catalog.go:1980–1997  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

1978}
1979
1980func nullStringForEmpty(value any) any {
1981 switch typed := value.(type) {
1982 case memcontract.Scope:
1983 trimmed := strings.TrimSpace(string(typed))
1984 if trimmed == "" {
1985 return nil
1986 }
1987 return trimmed
1988 case string:
1989 trimmed := strings.TrimSpace(typed)
1990 if trimmed == "" {
1991 return nil
1992 }
1993 return trimmed
1994 default:
1995 return value
1996 }
1997}
1998
1999func timeToUnixMillis(value time.Time) int64 {
2000 if value.IsZero() {

Callers 11

insertDecisionMethod · 0.85
insertDecisionEventMethod · 0.85
insertDreamEventTxFunction · 0.85
insertMemoryEventDBFunction · 0.85
insertMemoryEventTxFunction · 0.85
RecordExtractorEventMethod · 0.85
upsertRecallSignalFunction · 0.85
insertRecallEventMethod · 0.85

Calls

no outgoing calls

Tested by 1