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)
| 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. |
| 135 | func 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. |
| 147 | func (t *DoltgresType) AnalyzeFuncName() string { |