MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ContainsNull

Method ContainsNull

pkg/sql/sem/tree/datum.go:3212–3224  ·  view source on GitHub ↗

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)))

()

Source from the content-addressed store, hash-verified

3210// ((1, 1), (2, NULL))
3211// (((1, 1), (2, 2)), ((3, 3), (4, NULL)))
3212func (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
3226type dNull struct{}
3227

Callers 3

SetSortedMethod · 0.95
SearchSortedMethod · 0.80
makeEvalTupleInFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected