MakeLabeledTuple constructs a new instance of a TupleFamily type with the given field types and labels.
(contents []*T, labels []string)
| 1258 | // MakeLabeledTuple constructs a new instance of a TupleFamily type with the |
| 1259 | // given field types and labels. |
| 1260 | func 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…