MCPcopy Create free account
hub / github.com/dolthub/doltgresql / maybePopulateType

Method maybePopulateType

postgres/parser/sem/tree/datum.go:1461–1469  ·  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

1459// maybePopulateType populates the tuple's type if it hasn't yet been
1460// populated.
1461func (d *DTuple) maybePopulateType() {
1462 if d.typ == nil {
1463 contents := make([]*types.T, len(d.D))
1464 for i, v := range d.D {
1465 contents[i] = v.ResolvedType()
1466 }
1467 d.typ = types.MakeTuple(contents)
1468 }
1469}
1470
1471// ResolvedType implements the TypedExpr interface.
1472func (d *DTuple) ResolvedType() *types.T {

Callers 1

ResolvedTypeMethod · 0.95

Calls 2

MakeTupleFunction · 0.92
ResolvedTypeMethod · 0.65

Tested by

no test coverage detected