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

Method ArrayBaseType

server/types/type.go:152–162  ·  view source on GitHub ↗

ArrayBaseType returns the base type of an array type.

()

Source from the content-addressed store, hash-verified

150
151// ArrayBaseType returns the base type of an array type.
152func (t *DoltgresType) ArrayBaseType() *DoltgresType {
153 if !t.IsArrayType() {
154 return t
155 }
156 // Some array types have no declared element type for pg_catalog compatibility, but still have a logical type
157 // we return for analysis.
158 if t.ID == AnyArray.ID {
159 return AnyElement
160 }
161 return t.Elem.WithAttTypMod(t.attTypMod)
162}
163
164// BaseType returns a base type of given array or vector type.
165// If this type does not have base type, it returns itself.

Callers 15

CompareMethod · 0.95
EvalMethod · 0.95
getCastMethod · 0.80
serializeTypeArrayFunction · 0.80
deserializeTypeArrayFunction · 0.80
sqlStringFunction · 0.80
array_position.goFile · 0.80
array.goFile · 0.80
getStringArrFromAnyArrayFunction · 0.80
arrayToJsonRawFunction · 0.80
arrayToJsonPrettyFunction · 0.80

Calls 2

IsArrayTypeMethod · 0.95
WithAttTypModMethod · 0.80

Tested by

no test coverage detected