MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / IsPolymorphicType

Method IsPolymorphicType

pkg/sql/types/types.go:2324–2331  ·  view source on GitHub ↗

IsPolymorphicType returns true if the type can be used as the parameter or return-type of a polymorphic function. Note that this does not include RECORD (AnyTuple) or RECORD[].

()

Source from the content-addressed store, hash-verified

2322// return-type of a polymorphic function. Note that this does not include RECORD
2323// (AnyTuple) or RECORD[].
2324func (t *T) IsPolymorphicType() bool {
2325 for _, poly := range []*T{AnyElement, AnyArray, AnyEnum, AnyEnumArray} {
2326 if t.Identical(poly) {
2327 return true
2328 }
2329 }
2330 return false
2331}
2332
2333// IsPseudoType returns true if the type is a pseudotype.
2334func (t *T) IsPseudoType() bool {

Callers 3

IsPseudoTypeMethod · 0.95

Calls 1

IdenticalMethod · 0.95

Tested by

no test coverage detected