ContainsNull returns true if the tuple contains NULL, possibly nested inside other tuples. For example, all the following tuples contain NULL: (1, 2, NULL) ((1, 1), (2, NULL)) (((1, 1), (2, 2)), ((3, 3), (4, NULL)))
()
| 3210 | // ((1, 1), (2, NULL)) |
| 3211 | // (((1, 1), (2, 2)), ((3, 3), (4, NULL))) |
| 3212 | func (d *DTuple) ContainsNull() bool { |
| 3213 | for _, r := range d.D { |
| 3214 | if r == DNull { |
| 3215 | return true |
| 3216 | } |
| 3217 | if t, ok := r.(*DTuple); ok { |
| 3218 | if t.ContainsNull() { |
| 3219 | return true |
| 3220 | } |
| 3221 | } |
| 3222 | } |
| 3223 | return false |
| 3224 | } |
| 3225 | |
| 3226 | type dNull struct{} |
| 3227 |
no outgoing calls
no test coverage detected