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

Function MakeLabeledTuple

postgres/parser/types/types.go:1059–1071  ·  view source on GitHub ↗

MakeLabeledTuple constructs a new instance of a TupleFamily type with the given field types and labels.

(contents []*T, labels []string)

Source from the content-addressed store, hash-verified

1057// MakeLabeledTuple constructs a new instance of a TupleFamily type with the
1058// given field types and labels.
1059func MakeLabeledTuple(contents []*T, labels []string) *T {
1060 if len(contents) != len(labels) && labels != nil {
1061 panic(errors.AssertionFailedf(
1062 "tuple contents and labels must be of same length: %v, %v", contents, labels))
1063 }
1064 return &T{InternalType: InternalType{
1065 Family: TupleFamily,
1066 Oid: oid.T_record,
1067 TupleContents: contents,
1068 TupleLabels: labels,
1069 Locale: &emptyLocale,
1070 }}
1071}
1072
1073// Family specifies a group of types that are compatible with one another. Types
1074// in the same family can be compared, assigned, etc., but may differ from one

Callers 1

TypeCheckMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected