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

Method IsArrayType

server/types/type.go:647–650  ·  view source on GitHub ↗

IsArrayType returns true if the type is of 'array' type. It can be array category with empty its array attribute NULL and element attribute NOT NULL. Or it can be pseudo category with name 'anyarray'.

()

Source from the content-addressed store, hash-verified

645// It can be array category with empty its array attribute NULL and element attribute NOT NULL.
646// Or it can be pseudo category with name 'anyarray'.
647func (t *DoltgresType) IsArrayType() bool {
648 return (t.TypCategory == TypeCategory_ArrayTypes && t.Elem.ID != id.NullType && t.Array.ID == id.NullType) ||
649 (t.TypCategory == TypeCategory_PseudoTypes && t.ID.TypeName() == "anyarray")
650}
651
652// IsArrayCategory returns true if the type is of 'array' category.
653// It can be either array types or vector types.

Callers 15

ArrayBaseTypeMethod · 0.95
CompareMethod · 0.95
IoInputMethod · 0.95
IoOutputMethod · 0.95
ToArrayTypeMethod · 0.95
CallSendMethod · 0.95
CallReceiveMethod · 0.95
EvalMethod · 0.95
getCastMethod · 0.80
sqlStringFunction · 0.80
array.goFile · 0.80

Calls 1

TypeNameMethod · 0.80

Tested by

no test coverage detected