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

Method maybePopulateType

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

maybePopulateType populates the tuple's type if it hasn't yet been populated.

()

Source from the content-addressed store, hash-verified

2922// maybePopulateType populates the tuple's type if it hasn't yet been
2923// populated.
2924func (d *DTuple) maybePopulateType() {
2925 if d.typ == nil {
2926 contents := make([]types.T, len(d.D))
2927 for i, v := range d.D {
2928 contents[i] = *v.ResolvedType()
2929 }
2930 d.typ = types.MakeTuple(contents)
2931 }
2932}
2933
2934// ResolvedType implements the TypedExpr interface.
2935func (d *DTuple) ResolvedType() *types.T {

Callers 2

ResolvedTypeMethod · 0.95
AsJSONFunction · 0.80

Calls 2

MakeTupleFunction · 0.92
ResolvedTypeMethod · 0.65

Tested by

no test coverage detected