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

Function NewUnresolvedArrayDoltgresType

server/types/type.go:135–144  ·  view source on GitHub ↗

NewUnresolvedArrayDoltgresType returns an unresolved DoltgresType for an array of a user-defined element type. TypCategory and Elem are pre-filled so that IsArrayType() returns true before full resolution from the type collection. The array type ID follows the Postgres convention of "_" + element ty

(sch, elemName string)

Source from the content-addressed store, hash-verified

133// TypCategory and Elem are pre-filled so that IsArrayType() returns true before full resolution from the type
134// collection. The array type ID follows the Postgres convention of "_" + element type name.
135func NewUnresolvedArrayDoltgresType(sch, elemName string) *DoltgresType {
136 return &DoltgresType{
137 ID: id.NewType(sch, "_"+elemName),
138 IsUnresolved: true,
139 TypCategory: TypeCategory_ArrayTypes,
140 Elem: &DoltgresType{ID: id.NewType(sch, elemName), IsUnresolved: true},
141 Array: internalNullType,
142 BaseTypeType: internalNullType,
143 }
144}
145
146// AnalyzeFuncName returns the name that would be displayed in pg_type for the `typanalyze` field.
147func (t *DoltgresType) AnalyzeFuncName() string {

Callers 1

ToArrayTypeMethod · 0.85

Calls 1

NewTypeFunction · 0.92

Tested by

no test coverage detected