nullString returns nil for empty strings so they persist as SQL NULL.
(s string)
| 162 | |
| 163 | // nullString returns nil for empty strings so they persist as SQL NULL. |
| 164 | func nullString(s string) any { |
| 165 | if s == "" { |
| 166 | return nil |
| 167 | } |
| 168 | return s |
| 169 | } |
| 170 | |
| 171 | // nullJSON returns nil for empty/zero JSON so it persists as SQL NULL. |
| 172 | func nullJSON(j json.RawMessage) any { |
no outgoing calls
no test coverage detected