MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / MakeLabeledTuple

Function MakeLabeledTuple

pkg/sql/types/types.go:1260–1272  ·  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

1258// MakeLabeledTuple constructs a new instance of a TupleFamily type with the
1259// given field types and labels.
1260func MakeLabeledTuple(contents []*T, labels []string) *T {
1261 if len(contents) != len(labels) && labels != nil {
1262 panic(errors.AssertionFailedf(
1263 "tuple contents and labels must be of same length: %v, %v", contents, labels))
1264 }
1265 return &T{InternalType: InternalType{
1266 Family: TupleFamily,
1267 Oid: oid.T_record,
1268 TupleContents: contents,
1269 TupleLabels: labels,
1270 Locale: &emptyLocale,
1271 }}
1272}
1273
1274// MakePGVector constructs a new instance of a VECTOR type (pg_vector) that has
1275// the given number of dimensions.

Callers 3

TypeCheckMethod · 0.92
WithoutTypeModifiersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…